problem with getting page number of endnotes

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
 
C

Cindy M.

Hi Ruslan,

I don't believe it's possible to get the page number for an endnote. Endnotes
seem to exists "outside" the actual document. I'm not even able to get the rest
of the page using ActiveDocument.Bookmarks(\"Page") if the selection or range
is within the endnotes :-(
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?

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top