Please Note: This article is written for users of the following Microsoft Word versions: 2007 and 2010. If you are using an earlier version (Word 2003 or earlier), this tip may not work for you. For a version of this tip written specifically for earlier versions of Word, click here: Jumping Back to the TOC.

Jumping Back to the TOC

by Allen Wyatt
(last updated October 23, 2017)

19

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. Display the Word Options dialog box. (In Word 2007 click the Office button and then click Word Options. In Word 2010 display the File tab of the ribbon and then click Options.)
  2. At the left side of the dialog box click Customize (Word 2007) or Quick Access Toolbar (Word 2010). (See Figure 1.)
  3. Figure 1. The Quick Access Toolbar area of the Word Options dialog box.

  4. Using the Choose Commands From drop-down list, choose All Commands.
  5. 4 In the list of commands, locate and select the Back command.
  6. Click the Add button. The Back command moves to the right side of the dialog box.
  7. Click OK.

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 "Go to TOC." 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 Back command, with the only difference being that in step 4 you would locate and select the "Go to TOC" 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 (12266) applies to Microsoft Word 2007 and 2010. You can find a version of this tip for the older menu interface of Word 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. ...

MORE FROM ALLEN

Clean Up Your Macro List

Macros are part of the document and template that are loaded into memory when you open a file. If you have "junk" macros in ...

Discover More

Using Text Boxes

Text boxes are handy for placing information in a container that can "float" over your worksheet. This tip explains what text ...

Discover More

Understanding Cell Indenting

Formatting a cell could, if you desire, also include the indentation of information within the cell. This tip examines what ...

Discover More

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!

More WordTips (ribbon)

Locking Lines in a TOC

Want to "lock down" the lines in a TOC so that you cannot add new paragraph marks in the middle of one? You may not be able ...

Discover More

Using Multiple Tables of Contents

Adding multiple tables of contents is a must for some types of document design. Here's a great overview of how you can add ...

Discover More

Two Types of Page Numbers in a TOC

Word, when creating a table of contents, should automatically make sure that the page numbers it shows correspond to the way ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

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.

What is 6 - 0?

2017-06-23 18:55:04

Phil Reinemann

2017-01-04 05:53:41 Harry Audus

It might not be in Windows help, only in Office help, however Word 2007 says the alt keys do this instead, but it's with respect to working with web pages:
Go back one page. ALT+LEFT ARROW
Go forward one page. ALT+RIGHT ARROW

However, after hovering over the Back and Forward buttons in the QAT it shows Alt+Left and Alt+Right so that's good enough for me.


2017-06-23 18:43:14

Phil Reinemann

Likewise you can also add the Forward button to the QAT which allows you to move forward to where you were before you used the Back button. (I'm guessing Alt+RightArrow might also do - but I didn't try.)

Not shown in the tip are the two buttons for Back and Forward (seen here from MS Word 2007 if I can get this image insert thing to work):
(see Figure 1 below) and (see Figure 2 below)

(Note that the other forward is to forward in an email.)

Figure 1. BackButtonInAllCommands

Figure 2. ForwardButtonInAllCommands


2017-04-07 03:14:01

Ashish

Hi,

I Need Help !

I have long World document of 200 pages.

Kindly help me, Suppose if i am on 32 page or 165 page and i want to go back to Table of Content by click on page number in header (32 or 165) & it directs me to Table of content from top or particularly to that heading (either).

IS IT POSSIBLE ??

It would be great if any one can help me in this !

BR
Ashish


2017-01-04 05:53:41

Harry Audus

"You can also, if desired, use the Alt+Left Arrow shortcut. This is equivalent to pressing the Back button..."

Not on my laptop. And I can't find a reference to it in Windows Help for shortcuts either.


2016-11-01 13:47:39

Branko

One of the things that I did for a manual I wrote was to create a hyperlink in the header which users can click on on any page. It is linked to the TOC through a bookmark.


2015-10-21 14:22:28

Solotrader

Thanks a Million to Ken Endacott! These Macros worked perfectly and were simple to implement (although I had to run them from the VB Editor the first time). Using Word 2010. This is what I have always wanted to be able to do.


2015-10-20 06:39:39

Ken Endacott

Marsha

The following steps will place a button in the header or footer so that it appears on every page. Clicking on the button will jump back to the top of the TOC.

Be aware that you will be adding a macro to the document and it will need to be saved as a .docm file. Also, the users will need to set their Macro Security to Enable all macros.

1. Position the cursor in the header or footer
2. In the Controls group of the Developer tab click the Legacy Tools button and in the ActiveX controls click the Command Button icon. A button will be displayed. Dragging the corners will change its size.
3. Right click on the button and select Properties. Change the Caption text to something like "Jump to TOC"
4. Right click on the button and select View Code. In the subroutine displayed enter:

With ActiveDocument
If .TablesOfContents.Count > 0 Then
.TablesOfContents(1).Range.Select
Selection.Collapse
ActiveWindow.ScrollIntoView Selection.Range, True
End If
End With

5. In the Controls group of the Developer banner, click Design Mode to de-activate it.


2015-10-19 10:09:22

Klaus K

Many, many thanks to Ken Endacott and this site. Your Macros are a lifesaver. Very simple to implement and use on Word 2010, 14.0 32bit.


2015-09-30 15:02:02

Marsha

I should note - my TOC was used with styles :)


2015-09-30 14:59:36

Marsha

I have a document that will be distributed to new employees. It is fairly lenghty, will probably be around 30 pages once completed. I would like to add a button on each page that will bring you back to the TOC when pressed. Is that possible?


2015-05-02 07:54:52

Chris

I've relied on simply adding a "Back to Top" hyperlink to the footer (or could link to a book mark at the TOC but my TOC was at the top of the document).

However, need to double click on the footer to open it and then click on the link.

Is there an easy way to autoinsert this text on every page in a way so the link is active without having to open the footer?


2015-04-10 06:31:26

Ken Endacott

The macro ReverseLinkHeadings will create reverse TOC links so that clicking on a heading will jump the cursor to the TOC entry for that heading.

What it does is place a bookmark at each TOC entry and changes each heading paragraph into a hyperlink pointing to the appropriate bookmark. The bookmarks are given the same hidden name as the TOC bookmarks but with the suffix "R".

Before changes are made to the headings or before the TOC is regenerated the reverse links should be removed and re-created after the changes. The macro RemoveReverseLinks will remove the bookmarks and change the headings back to text.

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"
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 = False
End Sub

Sub RemoveReverseLinks()
Dim hyp As Hyperlink
Dim toc As TableOfContents
Dim bkmk As String
Dim aRange As Range

If ActiveDocument.TablesOfContents.Count = 0 Then
MsgBox "There are no Tables of Contents in document"
Exit Sub
End If
Set toc = ActiveDocument.TablesOfContents(1)
For Each hyp In toc.Range.Hyperlinks
bkmk = hyp.SubAddress
If ActiveDocument.Bookmarks.Exists(bkmk) Then
ActiveDocument.Bookmarks(bkmk).Range.Select
Selection.MoveEnd unit:=wdCharacter, Count:=-1
If Selection.Hyperlinks.Count > 0 Then
Selection.Range.Hyperlinks(1).Range.Select
Set aRange = Selection.Range
Selection.Fields.Unlink
ActiveDocument.Bookmarks.Add Range:=aRange, Name:=bkmk
If ActiveDocument.Bookmarks.Exists(bkmk & "R") Then
ActiveDocument.Bookmarks(bkmk & "R").Delete
End If
End If
End If
Next hyp
Options.CtrlClickHyperlinkToOpen = False
End Sub


2015-04-09 17:20:08

paul b.

Excellent job, Allen. God bless.


2013-07-10 02:07:50

Tariqul

love this


2013-04-30 00:15:05

nsj

really loved your tip. btw if toc is created using RD field.. as i have a very huge document we have splitted the documents based on the heading levels. the link dont work at all.. is there any way to retrieve the links such that if clicked, the topic selected gets open by opening the respective sub document.


2012-11-26 06:54:47

Dave Rathbun

In addition to the Back command described above, there is also a Go To TOC listed under All Commands that can be placed on the Quick Access Toolbar. The only issue is that in order to work, the TOC must be made using styles. When the TOC is generated using TOC Fields, clicking the Go To TOC button results in an error message stating that there is no TOC.


2012-11-12 11:34:15

Becci

Love all these tips!! Thank you so much for providing this service.


2012-11-12 11:20:39

Surendera M. Bhanot

I lke this one as I create ToC for each lengthy document


2012-11-11 13:23:35

Ned

You might make each heading a hyperlink back to the table of contents.


This Site

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.

Newest Tips
Subscribe

FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.