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

Removing All Bookmarks

by Allen Wyatt
(last updated January 4, 2014)

3

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.

WordTips is your source for cost-effective Microsoft Word training. (Microsoft Word is the most popular word processing software in the world.) This tip (9004) applies to Microsoft Word 2007, 2010, and 2013. You can find a version of this tip for the older menu interface of Word 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

Formatting an ASCII Table with Tabs

If you get a document from a coworker that has tabs used to line up tabular information, you might want to change that type ...

Discover More

Printing Show/Hide Characters

Non-printing characters are very handy to view when editing a document. But what if you want those characters to no longer be ...

Discover More

Limitations On Finding Characters

When you search for information in a worksheet, you expect Excel to return results that make sense. If you don't get a search ...

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 (ribbon)

Random OLE Bookmarks

Word has an irritating habit of placing unwanted bookmarks in a document that you've been editing for a while. These ...

Discover More

Automatically Referencing Info Entered in a Table

Tables are a great way to organize information in a document. At some point you may want a cell in a table to contain 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}] 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 7 - 1?

2014-01-07 07:56:49

Bryan

@CaroleJean: The "If ActiveDocumnt.Bookmarks.Count >=1 Then / End If" lines are unnecessary if you are going to use a For Each loop. That's really the whole reason to use a For Each loop.


2014-01-06 09:15:01

CaroleJean

This macro will delete all bookmarks including hidden bookmarks.

Sub RemoveAllBookmarks()
Dim stBookmark As Bookmark
ActiveDocument.Bookmarks.ShowHidden = True
If ActiveDocument.Bookmarks.Count >= 1 Then
For Each stBookmark In ActiveDocument.Bookmarks
stBookmark.Delete
Next stBookmark
End If
End Sub


2014-01-04 14:01:40

Ken Endacott

Word creates hidden bookmarks for such things as links from Table of Contents and deleting them could affect the document in unexpected ways. The following macro will delete only user created bookmarks and not hidden bookmarks
Sub RemoveAllBookmarks()
Dim objBookmark As Bookmark

For Each objBookmark In ActiveDocument.Bookmarks
if left(objBookmark.name,1) <> "_" then objBookmark.Delete
Next
End Sub


This Site

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

Newest Tips
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.