Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Bookmark.Name of current selection 2

Status
Not open for further replies.

Phi1Smith

Programmer
Jun 5, 2001
33
0
0
GB
Hi
Does anyone know how to get the name of a Bookmark of any currently selected text in a MSWord document.

Many Thanks in advance

Phil
 
Hi Phi1Smith,

Code:
Dim bmark As BookMark
For Each bmark in Selection.Bookmarks
    Msgbox bmark.Name
Code:
' Or whatever you want to do with it
Code:
Next bmark

Enjoy,
Tony
 
Tony

Thank you so much, this has been bugging me on and off for a couple of weeks. So simple when you see it.

Thanks Again

Phil
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top