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

  • Thread starter Thread starter pmm
  • Start date Start date
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).
 
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).
 
Back
Top