Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 12-13-2014, 02:20 PM
macropod's Avatar
macropod macropod is offline Identify BookMark Location Windows 7 64bit Identify BookMark Location Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
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
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Identify BookMark Location Move shape to bookmark location Byron Polk Word VBA 4 08-07-2014 03:21 AM
Bookmark vertical location seems slightly off for some paragraphs MaxInCO Word VBA 4 02-21-2014 03:12 PM
Outlook 2007 win7x32 Archive location/backup location question michael.monaco Outlook 0 11-19-2012 02:07 PM
Identify BookMark Location VBA to copy bookmark to a new location kent Word VBA 5 06-14-2012 02:18 PM
Identify BookMark Location identify non-members from two lists rterrain03 Office 5 12-01-2011 01:41 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 07:46 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft