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.

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:

In the list of toolbars, make sure the toolbar to which you want to add the Back button is selected.

Click on the Commands tab. (See Figure 2.)

Figure 2. The Commands tab of the Customize dialog box.

In the list of Categories, select All Commands.

In the list of Commands, locate and select the GoBack command.

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.

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:

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.

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. Learn more about Allen...

MORE FROM ALLEN

Positioning a Graphic in a Macro

Macros are a great way to process information in a worksheet. Part of that processing may involve moving graphics around so ...

Learning Made Easy! Quickly teach yourself how to format, publish, and share your content using Word 2013. With Step by Step, you set the pace, building and practicing the skills you need, just when you need them! Check out Microsoft Word 2013 Step by Step today!

More WordTips (menu)

Problems with TOC Styles

If you generate a table of contents for your document, there may be some unexpected surprises in the way the TOC appears. ...

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.

Source

(gif, jpeg or png only, 5MB maximum file size)

Source

(gif, jpeg or png only, 5MB maximum file size)

Source

(gif, jpeg or png only, 5MB maximum file size)

Notify me about new comments ONLY FOR THIS TIP

Notify me about new comments ANYWHERE ON THIS SITE

Hide my email address

What is 3 + 3?

2017-01-19 20:50:28

Ken Endacott

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.

2017-01-18 06:24:53

Shyam Kumar Sharma

Hi,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 manuallyMacro detail is below : Sub ReverseLinkHeadings()Dim hyp As HyperlinkDim toc As TableOfContentsDim bkmk As StringDim bkmkR As StringDim 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" hyp.Range.Select If Selection.Paragraphs(1).Range.Bookmarks.Count > 0 Then Selection.Paragraphs(1).Range.Bookmarks(1).Delete End If

ActiveDocument.Bookmarks.Add Range:=Selection.Range, Name:=bkmkR

If ActiveDocument.Bookmarks.Exists(bkmk) Then ActiveDocument.Bookmarks(bkmk).Range.Select If Selection.Hyperlinks.Count = 0 Then With ActiveDocument.Hyperlinks.Add(Anchor:=Selection.Range, _ Address:="", SubAddress:=bkmkR, TextToDisplay:=Selection.Text) .Range.Select Selection.ClearCharacterAllFormatting End With Else Selection.Range.Hyperlinks(1).Range.Select

sCode = Selection.Range.Hyperlinks(1).TextToDisplay

Selection.Fields.Unlink With ActiveDocument.Hyperlinks.Add(Anchor:=Selection.Range, _ Address:="", SubAddress:=bkmkR, TextToDisplay:=sCode) .Range.Select Selection.ClearCharacterAllFormatting End With ActiveDocument.Bookmarks.Add Range:=Selection.Range, Name:=bkmk End If End If Next hyp Options.CtrlClickHyperlinkToOpen = FalseEnd Sub