How to find the vertical position on the page where the text-cursorare placed

P

pmm

Hi

With this code I can get the vertical position of word number 40:
---->
MsgBox
PointsToCentimeters(ActiveDocument.Words(40).Information(wdVerticalPosition­
RelativeToPage))
---->

but I want the vertical position where the textcursor are placed in
the text - how?


Can anybody help me with this problems? (thanks).
 
M

macropod

Hi pmm,

The code:
MsgBox PointsToCentimeters(Selection.Information(wdVerticalPositionRelativeToPage))
will return the vertical position of the first character in a selection or, if no character is selected, the insertion point.

Cheers
--
macropod
[MVP - Microsoft Word]
-------------------------

Hi

With this code I can get the vertical position of word number 40:
---->
MsgBox
PointsToCentimeters(ActiveDocument.Words(40).Information(wdVerticalPosition­
RelativeToPage))
---->

but I want the vertical position where the textcursor are placed in
the text - how?


Can anybody help me with this problems? (thanks).
 

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