R
Ruslan
Hi,
i have a problem with getting page number of endnote.
I have document that has a lot of text and endnotes. Endnotes are placed on
the last two pages(only endnotes on this two pages) in the document. And i
have code like this:
Sub CurPage()
For Each en In ActiveDocument.Endnotes
en.Range.Select
Selection.MoveEnd wdCharacter, -1
MsgBox "Endnote ends on page" &
Selection.Information(wdActiveEndPageNumber)
Next
End Sub
I expect that Selection.Information(wdActiveEndPageNumber) will return
current page, where the endnote is placed. But it returns number of the page
where the reference (link) to this endnote placed.
Maybe somebody know how to get correct page number and why it is happens?
Thanks,
Ruslan
i have a problem with getting page number of endnote.
I have document that has a lot of text and endnotes. Endnotes are placed on
the last two pages(only endnotes on this two pages) in the document. And i
have code like this:
Sub CurPage()
For Each en In ActiveDocument.Endnotes
en.Range.Select
Selection.MoveEnd wdCharacter, -1
MsgBox "Endnote ends on page" &
Selection.Information(wdActiveEndPageNumber)
Next
End Sub
I expect that Selection.Information(wdActiveEndPageNumber) will return
current page, where the endnote is placed. But it returns number of the page
where the reference (link) to this endnote placed.
Maybe somebody know how to get correct page number and why it is happens?
Thanks,
Ruslan