Word Bookmarks

L

L.A. Lawyer

How do I find the vertical location on the page of bookmark (e.g., the
distance from the top of the page)?
 
J

Jean-Guy Marcil

L.A. Lawyer was telling us:
L.A. Lawyer nous racontait que :
How do I find the vertical location on the page of bookmark (e.g., the
distance from the top of the page)?

'_______________________________________
Dim myrange As Range
Dim vertPosition As Single

Set myrange = ActiveDocument.Bookmarks("Test").Range

vertPosition = Round(PointsToInches(myrange _
.Information(wdVerticalPositionRelativeToPage)), 2)
'_______________________________________

But for Word 97, remove the Round(...) part becasue it was not in the VBA
model then.
vertPosition = PointsToInches(myrange _
.Information(wdVerticalPositionRelativeToPage))

--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
(e-mail address removed)
Word MVP site: http://www.word.mvps.org
 

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