Click here to Skip to main content
15,886,199 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How to get Page number in End Note in MS Word using C#

Note: I am Selecting Inlineshape in End Note to get page number
Posted
Comments
Maciej Los 20-Feb-15 1:57am    
What have you tried till now?
Balav4 20-Feb-15 2:07am    
foreach (Word.Endnote _EndNote in AppWord.ActiveDocument.Endnotes)
{
foreach (Word.InlineShape Shapes in _EndNote.Range.InlineShapes)
{
Shapes.Select();
int num = Convert.ToInt32(AppWord.Selection.get_Information(Word.WdInformation.wdActiveEndPageNumber));

}
}

this is my Code. I am getting Wrong Page Number

1 solution

Based on this: how to get page number of a word document[^] it mmight be something like this:
C#
selection.get_Information(Microsoft.Office.Interop.Word.WdInformation.wdActiveEndPageNumber)

where selection is selected Endnote.Range ;)

For further information, please see: WdInformation Enumeration[^]
 
Share this answer
 
Comments
Balav4 26-Feb-15 2:39am    
By using Above code , we are not able to get EndNote Page number. It gets the EndNote Link Page No.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900