Large documents offer a few navigating challenges, especially when you need to jump back and forth between two areas. You could split the document, but that splits the screen and that might not be the right solution for you. Or, you could use any of the normal navigation tools and shortcuts, but it’s easy to get lost that way. Using VBA, you can insert a bookmark that acts as a placeholder. Then, when you’re ready to return, a single quick click is all that’s required.
This technique requires two quick macros, which follow:
Public Sub InsertBookmark()
'Insert bookmark for ssh.
Call Bookmarks.Add("ssh", Selection.Range)
Public Sub ReturnToBookmark()
'Return to previously inserted bookmark.
I used my initials to identify the bookmark, but you can use any string you like.
To add the macros, press [Alt]+[F11] to launch the Visual Basic Editor (VBE). In the Project Explorer, find ThisDocument for the current document. Then, enter the two sub procedures shown above.
Next, return to the document and add the macros to the Quick Access Toolbar (QAT), as follows:
- From the QAT dropdown, choose More Commands.
- From the Choose Commands From dropdown, choose Macros.
- In the list on the left, find InsertBookmark.
- Click Add to add the macro to the list of commands on the right.
- With the macro still selected, click Modify.
- In the resulting dialog, enter Mark in the Display Name control, and click OK. You could also change the macro’s display icon.
- Repeat steps 3 through 6 to add ReturnToBookmark to the list on the right and add the display name, Return.
- Click OK.
In Word 2003, drag the macros to the toolbar as follows:
- Launch the Customize dialog box by double-clicking a toolbar or menu or by choosing Customize from the Tools menu.
- Click the Commands tab.
- Choose Macros from the Categories list.
- Find InsertBookmark in the Commands list and drag it to the toolbar.
- Find ReturnToBookmark and drag it to the toolbar.
- Click Close.
Using the macros is simple. When you want to mark an area, just click the Mark macro on the QAT. Then, go wherever you want. When you’re ready to return to the marked spot, click Return.