Save your place in word a document using macros!
Takeaway: Use these two simple Word macros to temporarily bookmark a spot you want to return to later.
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 srz.
Call Bookmarks.Add(“srz”, Selection.Range)
End Sub
Public Sub ReturnToBookmark ()
‘Return to previously inserted bookmark.
ActiveDocument. Bookmarks(“srz”).Range.Select
End Sub
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.
- 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 Return ToBookmark and drag it to the toolbar.
- Click Close.