Word.Tips.Net WordTips (Menu Interface)

Jumping Back to the TOC

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: Jumping Back to the TOC.

Len has a rather long document in which he has created a table of contents. If he clicks a link in the TOC, Word displays the heading in the document. If he then wants to return to the TOC, Len notes that there doesn't seem to be a way to easily do so. He wonders if there is a single-click method of returning to the TOC after using the TOC to jump to a location in the document.

There are several different ways that you can approach this problem, and the solution that you choose will depend on your personal preference. One way is to simply rely on the position of your TOC. Most of the time the TOC will be near the very beginning of the document. This fact allows you to press Ctrl+Home to jump to the beginning of the document where the TOC can again be easily accessed.

Many people also choose to use the Document Map capability of Word. Turn it on, and you'll see an outline, at the left of the screen, that makes it easy to navigate through the document. Just locate the heading used for your TOC in the Document Map, click it once, and you are back at the TOC.

Another approach is to use the Go To feature: Just press F5 to display the Go To tab of the Find and Replace dialog box, choose Field at the left side, and then enter "toc" (without the quote marks) at the right side. When you press Enter, Word jumps to the TOC. This works because tables of contents are implemented in Word using fields, specifically the TOC field. Thus, Go To jumps to wherever the TOC field is located.

Still another approach is to use the Shift+F5 shortcut. This keystroke is supposed to cycle through the last three or four locations at which you made edits in your document. In testing, however, it also jumps back to the TOC, even if you didn't make an edit in the TOC. (Why? I'm not sure—it just did it for me.) In other words, you click the hyperlink to the heading, do some reading or work at the heading, then press Shift+F5, and Word jumps back to the TOC. It should be pointed out that this isn't always a reliable method of jumping back; if you make too many edits since you last revisited the TOC, Word will not take you back there.

You can also, if desired, use the Alt+Left Arrow shortcut. This is equivalent to pressing the Back button on your browser—it jumps back to where you were before clicking on the hyperlink in the TOC. This is particularly helpful with the TOC because if the table is quite long, the action will take you back to exactly where you clicked the heading in the TOC, rather than just to the beginning of the table.

If you prefer, you can modify the toolbar to show a Back button. Just follow these steps:

  1. Choose Customize from the Tools menu. Word displays the Customize dialog box.
  2. Make sure the Toolbars tab is selected. (See Figure 1.)
  3. Figure 1. The Toolbars tab of the Customize dialog box.

  4. In the list of toolbars, make sure the toolbar to which you want to add the Back button is selected.
  5. Click on the Commands tab. (See Figure 2.)
  6. Figure 2. The Commands tab of the Customize dialog box.

  7. In the list of Categories, select All Commands.
  8. In the list of Commands, locate and select the GoBack command.
  9. Use the mouse to drag the command from the Commands list to its new location on the toolbar. When you release the mouse button, the command is added to the toolbar.
  10. Click on Close to dismiss the Customize dialog box.

Your new Back command works just the same as the Back button on a browser, and the same as if you pressed the Alt+Left Arrow shortcut.

Word also provides another helpful command you can add to your toolbar. It was created to specifically allow you to jump back to the TOC. The name of the command is "GotoTableOfContents." The command is very convenient, but only works if you have a single TOC in your document. (If, for instance, you have a TOC at the beginning of each section or chapter in your document, then it won't work as expected.) To add it to a toolbar, follow the same steps you used to add the GoBack command, with the only difference being that in step 6 you would locate and select the GotoTableOfContents command.

Some people prefer to use bookmarks to allow jumping back to the TOC. Select something near the beginning of the TOC (perhaps the TOC's header) and bookmark it. Then you can use either Go To to jump to the bookmark, or you can use a small macro to jump back to it:

Sub BackTOC()
    Selection.GoTo What:=wdGoToBookmark, Name:="MyTOC"
End Sub

In this case, the name of the bookmark is MyTOC. This macro could be assigned to a keyboard shortcut or it could end up on a toolbar.

You could also create a hyperlink in your document that that jumped back to the bookmark. This hyperlink could easily be placed at the end of each section of your document, or even in the footer of each page.

WordTips is your source for cost-effective Microsoft Word training. (Microsoft Word is the most popular word processing software in the world.) This tip (884) 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: Jumping Back to the TOC.

Related Tips:

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!


Leave your own comment:

  Notify me about new comments ONLY FOR THIS TIP
Notify me about new comments ANYWHERE ON THIS SITE
Hide my email address
*What is 5+3 (To prevent automated submissions and spam.)
           Commenting Terms

Comments for this tip:

Ken Endacott    19 Jan 2017, 20:50
Shyam's comment is more applicable to the later versions of Word tip where there is some discussion about the macro.

However, here is some more information.

Each line in a TOC contains a hyperlink to the appropriate heading paragraph. You can expose the hyperlink by clicking in the left margin to select the line then SHIFT/F9. The hyperlink will look like:
 { HYPERLINK \l "_Toc472675045" }
where “_Toc472675045" is a random bookmark name generated by the TOC routine. The first character of the name is underscore to make the bookmark hidden.

The macro ReverseLinkHeadings sets up a hyperlink – bookmark pair that is the other way around. The heading paragraph is converted to a hyperlink to a bookmark placed at the start of the TOC entry line. For convenience the bookmark is given the same name as the forward bookmark but with the suffix “R”.

However, if the TOC is re-created for example after headings have been added or removed, then Word creates a whole new set of bookmark names and the bookmarks on TOC lines are deleted. Therefore the reverse links are no longer valid. The macro RemoveReverseLinks should be run before the TOC is re-created to remove the old reverse links and a new set created.

Shyam Kumar Sharma    18 Jan 2017, 06:24
Could you give me manually step by step process? how it is work this macros, i mentioned below macro details:
Please give me manually step or process details, because I wanted to like it is the same, how it is work, i want to know manually
Macro detail is below :
Sub ReverseLinkHeadings()
Dim hyp As Hyperlink
Dim toc As TableOfContents
Dim bkmk As String
Dim bkmkR As String
Dim sCode As String

  If ActiveDocument.TablesOfContents.Count = 0 Then
    MsgBox "There are no Tables of Contents in document"
    Exit Sub
  End If
  Options.CtrlClickHyperlinkToOpen = True
  Set toc = ActiveDocument.TablesOfContents(1)
  For Each hyp In toc.Range.Hyperlinks
    bkmk = hyp.SubAddress
    bkmkR = bkmk & "R"
    If Selection.Paragraphs(1).Range.Bookmarks.Count > 0 Then
    End If
    ActiveDocument.Bookmarks.Add Range:=Selection.Range, Name:=bkmkR

    If ActiveDocument.Bookmarks.Exists(bkmk) Then
      If Selection.Hyperlinks.Count = 0 Then
        With ActiveDocument.Hyperlinks.Add(Anchor:=Selection.Range, _
           Address:="", SubAddress:=bkmkR, TextToDisplay:=Selection.Text)
        End With
        sCode = Selection.Range.Hyperlinks(1).TextToDisplay
        With ActiveDocument.Hyperlinks.Add(Anchor:=Selection.Range, _
           Address:="", SubAddress:=bkmkR, TextToDisplay:=sCode)
        End With
        ActiveDocument.Bookmarks.Add Range:=Selection.Range, Name:=bkmk
      End If
    End If
  Next hyp
  Options.CtrlClickHyperlinkToOpen = False
End Sub

Our Company

Sharon Parq Associates, Inc.

About Tips.Net

Contact Us


Advertise with Us

Our Privacy Policy

Our Sites


Beauty and Style




DriveTips (Google Drive)

ExcelTips (Excel 97–2003)

ExcelTips (Excel 2007–2016)



Home Improvement

Money and Finances


Pests and Bugs

Pets and Animals

WindowsTips (Microsoft Windows)

WordTips (Word 97–2003)

WordTips (Word 2007–2016)

Our Products

Helpful E-books

Newsletter Archives


Excel Products

Word Products

Our Authors

Author Index

Write for Tips.Net

Copyright © 2017 Sharon Parq Associates, Inc.