Please Note: This article is written for users of the following Microsoft Word versions: 97, 2000, 2002, and 2003. If you are using a later version (Word 2007 or later), this tip may not work for you. For a version of this tip written specifically for later versions of Word, click here: Removing All Bookmarks.

Removing All Bookmarks

Written by Allen Wyatt (last updated May 4, 2022)
This tip applies to Word 97, 2000, 2002, and 2003


7

Some people absolutely love bookmarks. They do come in handy, but if someone else set bookmarks in a document, you may not need them once you get the document from them. If there are many, many bookmarks set (remember, we are talking about people who really love bookmarks), removing them all one at a time can be rather tedious.

If you find yourself in this situation, you will want to keep the following macro handy. It examines the active document (the one you are looking at) and removes all the bookmarks within it.

Sub RemoveAllBookmarks()
    Dim objBookmark As Bookmark

    For Each objBookmark In ActiveDocument.Bookmarks
        objBookmark.Delete
    Next
End Sub

You should note that this simply deletes the bookmark, not any text referenced by the bookmark.

Note:

If you would like to know how to use the macros described on this page (or on any other page on the WordTips sites), I've prepared a special page that includes helpful information. Click here to open that special page in a new browser tab.

WordTips is your source for cost-effective Microsoft Word training. (Microsoft Word is the most popular word processing software in the world.) This tip (1630) applies to Microsoft Word 97, 2000, 2002, and 2003. You can find a version of this tip for the ribbon interface of Word (Word 2007 and later) here: Removing All Bookmarks.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Resizing a Text Box

Text boxes allow you to "segment" information in your document and lay it out differently. You can easily resize these ...

Discover More

Selectively Changing Endnotes to Footnotes

Want to turn some (but not all) of your endnotes into footnotes. Rather than do it manually, you can apply the shortcut ...

Discover More

Identifying Duplicates

Do you need to flag duplicate values in your data? This tip shows three different ways you can do the flagging you need.

Discover More

Create Custom Apps with VBA! Discover how to extend the capabilities of Office 2013 (Word, Excel, PowerPoint, Outlook, and Access) with VBA programming, using it for writing macros, automating Office applications, and creating custom applications. Check out Mastering VBA for Office 2013 today!

More WordTips (menu)

Protecting Bookmarks

Bookmarks are a great boon in developing and working with documents—until someone deletes them. When it comes to ...

Discover More

Seeing Where Bookmarks Are

Bookmarks can be great for referencing and finding portions of your document. If you want to easily see where the ...

Discover More

Reusing a Bookmark

Bookmarks in Word are just like bookmarks used in paper books, any given bookmark may be reused to mark a new location. ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] (all 7 characters, in the sequence shown) in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is 2 + 2?

2024-10-12 04:53:58

Ken Endacott

The macro RemoveAllBookmarks removes all bookmarks including hidden bookmarks. Hidden bookmarks have an underscore as the first character of their name and are used by Tables of Contents and some fields. Removing them can give error messages.

The macro RemoveAllUserBookmarks below will remove only user defined bookmarks.

Sub RemoveAllUserBookmarks()
Dim objBookmark As Bookmark
For Each objBookmark In ActiveDocument.Bookmarks
If Left(objBookmark.Name, 1) <> "_" Then objBookmark.Delete
Next
End Sub


2024-10-10 05:07:33

David Cone

Found a possible solution.

Go into Insert Bookmark, and I found a bookmark at the top of the list with a blank title.

Deleted that manually and the macro worked correctly after that.


2023-01-13 07:40:20

nevzat

i have the same problem:

Hi Allen, I tried your macro for deleting bookmarks and am getting the error 5891 "that property is not available on that object" .
Do you have any idea for how I might troubleshoot this?

Thanks


2022-09-13 10:24:25

jen

Hi Allen, I tried your macro for deleting bookmarks and am getting the error 5891 "that property is not available on that object" .
Do you have any idea for how I might troubleshoot this?

Thanks


2020-07-23 00:33:01

Pearl

Thank you, Allen for this macro.


2019-03-05 16:38:52

Camila

Thank you so much!


2018-01-31 15:07:35

Charles Robinson

How do i remove all bookmarks from only part of a document?


This Site

Got a version of Word that uses the menu interface (Word 97, Word 2000, Word 2002, or Word 2003)? This site is for you! If you use a later version of Word, visit our WordTips site focusing on the ribbon interface.

Videos
Subscribe

FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.