View Single Post
 
Old 12-13-2014, 02:20 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,385
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Bookmarks span ranges, which means you can retrieve their start & end points. For example:
Code:
Sub Demo()
With ActiveDocument.Bookmarks("Bookmarkname")
  MsgBox .Range.Start & vbTab & .Range.End
End With
End Sub
However, in a document subject to editing (as the risk of inadvertent deletion or even just updating the bookmarked content as per the 'UpdateBM' code in your other thread (https://www.msofficeforums.com/word-...out-loops.html) evidences), those start & end points are liable to change with every keystroke. Consequently, retrieving their locations is only valid for that instant.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote