• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 186
  • Last Modified:

Add a link to everypage (not in header or footer)

I have a document which is 600 pages long and need to have a link on every page to go back to the Table of Contents (TOC).  I cannot put the link in the header because I do not want to have to open the header just to click on the link.  Is there any other way to make a link on every page in the same location to link to a bookmark?  Any help would greatly be appreciated!
Chris Pfeiffer
Chris Pfeiffer
  • 2
1 Solution
It is be possible to bookmark the TOC, and to put a Hyperlink to the bookmark on every page that the current pagination has produced.

However it is fighting the design and purpose of Word, in that it is designed to reformat the document so that it prints well in the current environment. Word is not a display application. Any interactivity is primarily there to assist in editing. That is why you have to decide whether you are editing the main body of the document, or Headers and Footers.

Obviously, if you insert or delete any text early in the document, even a single character, the lines might fold in a different place, and pages overflow differently, thus ruining any page-specific text. This can also happen if things outside the document change, such as the printer driver or font files.

Keeping those caveats in mind, try this macro whcihattempts to put  hyperlinks at what is currently the top of each page.
Sub HypsToToc()
    Dim bmk As Bookmark
    Dim i As Integer
    Dim rng As Range
    With ActiveDocument
        Set bmk = .Bookmarks.Add("MyTOC", .TablesOfContents(1).Range)
        For i = 1 To .Range.Information(wdNumberOfPagesInDocument)
            Selection.GoTo wdGoToPage, wdGoToAbsolute, i
            Selection.Collapse wdCollapseStart
            ActiveDocument.Hyperlinks.Add Selection.Range, , "MyTOC", , "Table of Contents"
        Next i
    End With

End Sub

Open in new window

Stacy BrownSenior Applications AdministratorCommented:
You can do this with a bookmark, a text box, and a hyperlink.

First, create a bookmark on the first page where you want to jump back to.

Insert a text box at the bottom of the second page where you would like your hyperlink to appear and type in something like "Go back to beginning".  Position it where you want it to go.  

Select the text in your text box and choose Insert > Hyperlink.  Choose place in this document and you will see your bookmark.  Select your bookmark and OK the box.

Now select the text box and copy it.  Go to each page and paste it.  It will appear in the same approximate position.  Take a look at the text box properties, layout tab to get the absolute position numbers if you'd like.  I would recommend that you check lock anchor and uncheck all other boxes at the bottom of the Layout dialog

See the attached for an example.
Thinking about it again, the TOC is usually at the start of a document, so Ctrl+Home should get you pretty near to the TOC itself.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now