by Allen Wyatt
(last updated February 28, 2015)
Susan does quite a bit of work with bookmarks in her documents. To help her do her work more efficiently, she would like to turn on/off the display of bookmarks without having to go to the Word Options dialog box every time.
This is rather easy to do using what is effectively a single-line macro:
Sub ToggleBookmarks() ActiveWindow.View.ShowBookmarks = _ Not ActiveWindow.View.ShowBookmarks End Sub
This macro can easily be assigned to a shortcut key or to a button on the Quick Access Toolbar. Either way, it toggles the setting of the bookmarks in the current window. (It affects only the current window.)
WordTips is your source for cost-effective Microsoft Word training. (Microsoft Word is the most popular word processing software in the world.) This tip (9135) applies to Microsoft Word 2007, 2010, and 2013.
Comprehensive VBA Guide Visual Basic for Applications (VBA) is the language used for writing macros in all Office programs. This complete guide shows both professionals and novices how to master VBA in order to customize the entire Office suite for their needs. Check out Mastering VBA for Office 2010 today!
When creating a macro, you may need to determine the names of the bookmarks in the document. You can do this using the ...Discover More
Need to get rid of a lot of bookmarks all at once? Word doesn't provide a way to do it, but you can use the short macro ...Discover More
Word has an irritating habit of placing unwanted bookmarks in a document that you've been editing for a while. These ...Discover More
FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."
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.