How to get the position of a paragraph in word 2007?

Q

qnever

I want to get the position relative to page of a paragraph in word 2007.
However, I can only get the correct positions of paragraphs in the first
page. But with the same macros in word 2003, I got all positions of
paragraphs in every page correctly. Below is my macro.
Thanks!

Sub Test()
Dim i As Paragraph, myInfo As String, myRange As Range
For Each i In ActiveDocument.Content.Paragraphs
If i.OutlineLevel < 10 And i.Range.Information(wdWithInTable) =
False Then
myInfo = myInfo &
i.Range.Information(wdVerticalPositionRelativeToPage) & " "
End If
Next
MsgBox myInfo
End Sub
 

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