If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Cursor position (Word)
How can I display the measurement of the cursor's position in inches from the
left margin/left edge of the page and the number of lines down from the top margin/edge of page in Word? |
#2
|
|||
|
|||
Cursor position (Word)
You can use the VBA Selection.Information method
MsgBox "The Selection is " & Selection.Information(wdHorizontalPositionRelative ToPage)/72 & " inch from the left edge of the page." MsgBox "The Selection is " & Selection.Information(wdVerticalPositionRelativeTo Page)/72 & "inch from the top of the page." The division by 72 is to convert the result from points to inches. -- Hope this helps, Doug Robbins - Word MVP Please reply only to the newsgroups unless you wish to obtain my services on a paid professional basis. "APF" wrote in message ... How can I display the measurement of the cursor's position in inches from the left margin/left edge of the page and the number of lines down from the top margin/edge of page in Word? |
#3
|
|||
|
|||
Cursor position (Word)
You could also use the PointsToInches() function so you don't have to
remember the number 72. :-) -- Regards, Jay Freedman Microsoft Word MVP FAQ: http://word.mvps.org Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit. On Wed, 24 Feb 2010 11:35:24 +1000, "Doug Robbins - Word MVP" wrote: You can use the VBA Selection.Information method MsgBox "The Selection is " & Selection.Information(wdHorizontalPositionRelativ eToPage)/72 & " inch from the left edge of the page." MsgBox "The Selection is " & Selection.Information(wdVerticalPositionRelativeT oPage)/72 & "inch from the top of the page." The division by 72 is to convert the result from points to inches. -- Hope this helps, Doug Robbins - Word MVP Please reply only to the newsgroups unless you wish to obtain my services on a paid professional basis. "APF" wrote in message ... How can I display the measurement of the cursor's position in inches from the left margin/left edge of the page and the number of lines down from the top margin/edge of page in Word? |
Thread Tools | |
Display Modes | |
|
|