Link to home
Start Free TrialLog in
Avatar of Jerry L
Jerry LFlag for United States of America

asked on

Word: How to Add Hyperlink to Header or Footer of Document

When I edit the Footer of the document, Word allows me to format a portion of the text as a Hypertext Link.  But when I click out of the Header / Footer editing tool, the hyperlink is not active.  Is this a bug in MS Word?  How do I add a Hypertext Link to the footer of my document?

------------------------
Microsoft Office 2003
Windows XP
Avatar of gbahri
gbahri

Hi WizeOwl,

This can't be done. The header and footer are in a different document story from the main document, and Word restricts both stories to be open at the same time.

What can be done is add a "Go to TOC" toolbar button in “Tools>Customize” under All Commands as GotoTableofContents.

Thanks,

GBahri
Avatar of Jerry L

ASKER

The desired end result is that in the final document there should a hyperlink in the footer.  The text in the footer, however, is not functional as a hyperlink.  Why is this?  If I create a "Hyperlink" in the footer, what good is it if you can't click on it from the main document?

Ultimately, I am creating a PDF from this MS Word doc.  I need the hyperlinks in the footer to be functional in the PDF document.

---------------------
See also:  https://www.experts-exchange.com/questions/21897517/PDF-How-to-Add-Hyperlink-to-Footer-on-All-Pages-of-Acrobat-Document.html
This can  be done in Adobe (I'm using 6.0. Pro), pls. try these steps:

1. Open PDF document in Adobe Acrobat
2. Select "Advanced>Links>Create from URLs in Document".
3. Select "All"
4. Press "OK"
Above steps activates all URLS in document.

Hope, this works for you,

Thanks,

GBahri
SOLUTION
Avatar of GrahamSkan
GrahamSkan
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Jerry L

ASKER

gbahri - The URL did not transfer to the PDF from the Word doc.  It's just text now, "Click Here."  I tried your suggestion but no effect.

GrahamSkan - I do not understand how to use the Text Box tool even after reading the user's manual on it.  However, what I am able to do is use the Link tool and create an area around the text, "Click Here", that becomes a link.

Is there a macro that will duplicate that action to the footers on all the pages?  ( I will also need instructions on how to create the macro, and how to run it. )
I am a bit handicapped at the moment because I only have Word 2000 to hand, but I can't find anything called a Link tool, nor can I recall it the in Word 2003 that I usually use.

You insert a text box by doing Insert/Text Box. It you have any text selected, it will be included in the box. Otherwise you can draw an empty box with the mouse. In either case you can move and resize it as you wish. You can insert and edit most things into it, including Hyperlinks.
Avatar of Jerry L

ASKER

I thought you were referring to the PDF.  But now I see you were referring to the Word document.  Can you do macros in PDF?

In that case, I don't know how to work with macros in Word.  Nor do I know how to create the Text Box.  Can you tell me how to do that ?  Where do I edit the macro you suggested above?  How do I run it?  How do you stop a macro after starting it if I were to record one?

(Also, I'm going to raise the point value for this question.)
OK.
I only know Word. GBhari, it seems, and some other experts know both.

I have explained how to create a text box.

For VBA macros, you can toggle to the VBA editor with Alt = f11.

In the VBA editor, you should see your projects in the top, left-hand pane.
The first project should be the Normal project. Click on that to select it. You can then insert, via the menu, a new module. Select the module by double-clicking in the left-hand pane. Paste the code into the right-hand pane. To run the code, with the cursor in the procedure in the right-hand pane, press F5
Avatar of Jerry L

ASKER

It is similar to running macros in Excel.  You can also run the code from the Word document by pressing ALT-F8.

I am getting a run-time error '91', "Object variable or With Block variable not set" .
The debugger points to this line:  
       sh.RelativeHorizontalPosition = wdRelativeHorizontalPositionPage
It sounds as if it hasn't found the text box to be copied.
It has to be on the first page and has to contain a hyperlink.
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Jerry L

ASKER

Solution
-------------
I got this to work by using the explicit URL:
   http://www.my-site.com/whatever/

Rather than trying to create a hyperlink in which the Anchor Text read something else, like "Click Here".

I'm going to give the solution to Gbahri because it's the simpler solution, and the text box doesn't seem to work without an explicit URL either.  Split points since the VB code is useful.
Thanks