Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Sub GetBMRangeNumbers()
MsgBox ActiveDocument.Bookmarks("Red").Range.Start _
& " " & ActiveDocument.Bookmarks("Red").Range.End
End Sub[/vba]
will display "20 43". That is, the Start of the bookmark range is 20 characters from the start of the document. The End of the bookmark range is 43 characters.
So, EXACTLY what are you trying to do. Using bookmarks is the the best way to go to a specific location. What you are asking is "how do I learn the values of x and y when at a particular location?"
If the Selection is only a point - that is, nothing is selected, you just have a cursor, then x and y = the same.
You can have code to determine that:
[code]Msgbox Selection.Range.Start & " " & Selection.Range.End