Help! Is it possible to view the names of the bookmarks that have been created in a word document? I can get the locations to show but not the actual name of the bookmarks? Thanks!
![]() |
Patch reliability is unclear. Unless you have an immediate, pressing need to install a specific patch, don't do it. |
SIGN IN | Not a member? | REGISTER | PLUS MEMBERSHIP |
-
Bookmarks in word (word 97)
Home » Forums » AskWoody support » Productivity software by function » MS Word and word processing help » Bookmarks in word (word 97)
- This topic has 15 replies, 8 voices, and was last updated 23 years, 6 months ago.
Viewing 2 reply threadsAuthorReplies-
WSAndrew Cronnolly
AskWoody Lounger -
WSGary Frieder
AskWoody LoungerNovember 28, 2001 at 6:29 am #1793381If you’re not averse to using macros, here are a couple that are useful when building templates:
This one will insert the name of each bookmark in the document, immediately after the location of the bookmark – never run this in your template! – always run it in a copy or in a document based on the template:
Public Sub TypeEachBmkName() Dim aBmk As Bookmark Dim strBmkName As String If Documents.Count > 0 Then For Each aBmk In ActiveDocument.Bookmarks strBmkName = aBmk.Name aBmk.Range.InsertAfter strBmkName Next aBmk End If End Sub
This one produces a list of all the bookmarks in a given document, in a new document:
Public Sub ListBookmarksByName() Dim myBook As Bookmark Dim strBooklist As String strBooklist = "Alphabetical list of bookmarks in " _ & ActiveDocument.FullName & ":" & vbCr For Each myBook In ActiveDocument.Bookmarks strBooklist = strBooklist & myBook.Name & vbCr Next Documents.Add Selection.TypeText strBooklist End Sub
Gary
-
WSfburg
AskWoody LoungerNovember 29, 2001 at 6:03 am #1793403Prime Consulting makes an add-on that includes a toolbar that, when you click it, lists all your bookmarks. If you click one, you’re sent there. It’s a goodie. Check their site at http://www.primeconsulting.com/software/index.html
Fred
-
Charles Kenyon
AskWoody Lounger -
WSfburg
AskWoody Lounger -
WSPhil Rabichow
AskWoody LoungerNovember 30, 2001 at 9:52 am #1793431Hi Charles:
The Prime Consulting gives you a drop down menu on a toolbar. It’s much faster to scroll the toolbar listings than click a drop down arrow in a dialog box. You can name the toolbar button with a “&” so that you can open it with an “Alt+hotkey” & then arrow up or down through your bookmarks.
-
WSIanWilson
AskWoody LoungerDecember 1, 2001 at 3:21 am #1793455What this discussion hasn’t directly answered so far is whether there is a way to identify a bookmark’s name when you see the marker in your document. I assume that’s what the original question was asking. Ideallly I would like to be able to point at a bookmark symbol and have a little pop-up tell me its name. I often work with documents (training manuals) that have been through several versions over the years. They are often littered with bookmarks and it would be great to be able to find out what they are, so as to be able to delete those that are no longer needed..
Any way of doing that? I too would love to know.
(You can do it the long way round, by trial and error using the go to function until you strike lucky, but it’s not very satisfactory.)
Ian
-
WSGary Frieder
AskWoody Lounger -
WSPhil Rabichow
AskWoody Lounger -
WSIanWilson
AskWoody Lounger -
WSIanWilson
AskWoody Lounger -
Charles Kenyon
AskWoody LoungerDecember 6, 2001 at 12:10 am #1793475Like Phil, I think this is great! Sometimes, though, my bookmarks get a bit tangled, especially if they are put in by macros. I came up with the following modification:
Sub GetSelectedBookmarkName() ' from Gary Frieder on Woody's Lounge ' modified with error handler & multiple bookmark handler by Charles Kenyon ' ' Add to context menus Dim iBookCount As Integer 'number of bookmarks Dim iCount As Integer 'counter for loop Dim sName As String 'holds bookmark name in loop ' On Error GoTo NoBookMark iBookCount = Selection.Bookmarks.Count If iBookCount > 1 Then For iCount = 1 To iBookCount sName = Selection.Bookmarks(iCount).Name MsgBox Prompt:="The selection is in " & iBookCount & " bookmarks!" _ & vbCrLf & "The name of bookmark No." & iCount & " is " _ & sName & ".", _ Buttons:=vbInformation, Title:="Multiple Bookmarks Names" Next iCount Exit Sub End If MsgBox Prompt:="The bookmark's name is " _ & Selection.Bookmarks(1).Name & ".", _ Buttons:=vbInformation, Title:="Bookmark Name" Exit Sub NoBookMark: MsgBox Prompt:="There is no bookmark here.", _ Title:="Sorry!", Buttons:=vbExclamation End Sub
So far it works well. Thought I would share.
-
WSGary Frieder
AskWoody LoungerDecember 6, 2001 at 9:59 am #1793478Hi Charles,
A question and a suggested tweak:
A question about the error handler and message – it looks like you want this message to display if the selection contains 0 bookmarks, but it’s unclear what condition is expected to cause the error – if there are no bookmarks in the selection, you’d get a count of 0, but that won’t cause an error to occur.
Also, it looks like if there is more than one bookmark in the selection, then both message boxes are going to show(?) (since you have the second one outside the If structure.)
One way to handle all the different Count eventualities would be to use a Select Case structure – this would be along the lines of:
Select Case iBookCount
Case 0
MsgBox saying there’s no bookmarks
Case 1
MsgBox saying there’s one bookmark
Case Else
Loop and msgbox saying there’s multiple bookmarks
End Select– a side benefit being that you don’t need to use an Error event to prompt the display of the 0 bookmarks MsgBox.
Regards,
Gary -
Charles Kenyon
AskWoody LoungerDecember 8, 2001 at 2:31 am #1793487Hi Gary,
Thanks for the feedback.
I wrote this for use in a context menu, assuming that the person using it might not have bookmark delimiters displayed. If the selection point is not in (or does not contain) any bookmarks, the error handler picks up on trying to get the name of a non-existing bookmark. (Member of collection does not exist.)
MsgBox Selection.Bookmarks.Name will generate such an error. You are right that I could test for Count = 0 instead. I’m not aware of any reason for preferring one method over the other (except that the error handler would also be triggered by an unforseen error).
If there is more than one bookmark, the code produces one message box for each bookmark, giving the total number of bookmarks, the number of this bookmark, and the name of this bookmark. Then it executes the Exit Sub statement before reaching the end of the If structure. I could have put in an Else structure instead but was just typing code and already had the message box for one bookmark done.
-
WSeman
AskWoody Lounger
-
-
-
-
Viewing 2 reply threads -

Plus Membership
Donations from Plus members keep this site going. You can identify the people who support AskWoody by the Plus badge on their avatars.
AskWoody Plus members not only get access to all of the contents of this site -- including Susan Bradley's frequently updated Patch Watch listing -- they also receive weekly AskWoody Plus Newsletters (formerly Windows Secrets Newsletter) and AskWoody Plus Alerts, emails when there are important breaking developments.
Get Plus!
Welcome to our unique respite from the madness.
It's easy to post questions about Windows 11, Windows 10, Win8.1, Win7, Surface, Office, or browse through our Forums. Post anonymously or register for greater privileges. Keep it civil, please: Decorous Lounge rules strictly enforced. Questions? Contact Customer Support.
Search Newsletters
Search Forums
View the Forum
Search for Topics
Recent Topics
-
Search Forums only bring up my posts?
by
Deo
48 minutes ago -
Windows Spotlight broken on Enterprise and Pro for Workstations?
by
steeviebops
8 hours, 36 minutes ago -
Denmark wants to dump Microsoft for Linux + LibreOffice
by
Alex5723
1 hour, 13 minutes ago -
How to get Microsoft Defender to honor Group Policy Setting
by
Ralph
9 hours, 13 minutes ago -
Apple : Paragon’s iOS Mercenary Spyware Finds Journalists Target
by
Alex5723
19 hours, 22 minutes ago -
Music : The Rose Room – It’s Been A Long, Long Time album
by
Alex5723
20 hours, 27 minutes ago -
Disengage Bitlocker
by
CWBillow
10 hours, 25 minutes ago -
Mac Mini M2 Service Program for No Power Issue
by
Alex5723
22 hours, 27 minutes ago -
New Win 11 Pro Geekom Setup questions
by
Deo
2 hours, 13 minutes ago -
Windows 11 Insider Preview build 26200.5651 released to DEV
by
joep517
1 day, 5 hours ago -
Windows 11 Insider Preview build 26120.4441 (24H2) released to BETA
by
joep517
1 day, 5 hours ago -
iOS 26,, MacOS 26 : Create your own AI chatbot
by
Alex5723
1 day, 9 hours ago -
New PC transfer program recommendations?
by
DaveBoston
5 hours, 1 minute ago -
Windows 11 Insider Preview Build 22631.5545 (23H2) released to Release Preview
by
joep517
1 day, 13 hours ago -
Windows 10 Build 19045.6029 (22H2) to Release Preview Channel
by
joep517
1 day, 13 hours ago -
Best tools for upgrading a Windows 10 to an 11
by
Susan Bradley
1 day, 2 hours ago -
The end of Windows 10 is approaching, consider Linux and LibreOffice
by
Alex5723
6 hours, 7 minutes ago -
Extended Windows Built-in Disk Cleanup Utility
by
bbearren
15 hours, 1 minute ago -
Win 11 24H2 June 2025 Update breaks WIFI
by
dportenlanger
2 days, 8 hours ago -
Update from WinPro 10 v. 1511 on T460p?
by
CatoRenasci
1 day, 6 hours ago -
System Restore and Updates Paused
by
veteran
2 days, 11 hours ago -
Windows 10/11 clock app
by
Kathy Stevens
1 day, 22 hours ago -
Turn off right-click draw
by
Charles Billow
2 days, 14 hours ago -
Introducing ChromeOS M137 to The Stable Channel
by
Alex5723
2 days, 18 hours ago -
Brian Wilson (The Beach Boys) R.I.P
by
Alex5723
39 minutes ago -
Master patch listing for June 10, 2025
by
Susan Bradley
2 days, 19 hours ago -
Suggestions for New All in One Printer and a Photo Printer Windows 10
by
Win7and10
2 hours, 18 minutes ago -
Purchasing New Printer. Uninstall old Printer Software First?
by
Win7and10
3 days, 1 hour ago -
KB5060842 Issue (Minor)
by
AC641
1 day, 13 hours ago -
EchoLeak : Zero Click M365 Copilot leak sensitive information
by
Alex5723
3 days, 8 hours ago
Recent blog posts
Key Links
Want to Advertise in the free newsletter? How about a gift subscription in honor of a birthday? Send an email to sb@askwoody.com to ask how.
Mastodon profile for DefConPatch
Mastodon profile for AskWoody
Home • About • FAQ • Posts & Privacy • Forums • My Account
Register • Free Newsletter • Plus Membership • Gift Certificates • MS-DEFCON Alerts
Copyright ©2004-2025 by AskWoody Tech LLC. All Rights Reserved.