• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 183
  • 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!
0
Chris Pfeiffer
Asked:
Chris Pfeiffer
  • 2
1 Solution
 
GrahamSkanCommented:
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

0
 
Stacy BrownCommented:
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.
Hyperlink-Text-Box.doc
0
 
GrahamSkanCommented:
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.
0

Featured Post

Restore individual SQL databases with ease

Veeam Explorer for Microsoft SQL Server delivers an easy-to-use, wizard-driven interface for restoring your databases from a backup. No expert SQL background required. Web interface provides a complete view of all available SQL databases to simplify the recovery of lost database

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