Hyperlinks in a protected document

B

Beth Melton

Since the article you cited does walk you through the process, is there a
specific area you are having problems with? Is there something in the
article you don't understand? If so, what is it? What isn't working exactly?

Please post all follow-up questions to the newsgroup. Requests for
assistance by email cannot be acknowledged.

~~~~~~~~~~~~~~~
Beth Melton
Microsoft Office MVP

Coauthor of Word 2007 Inside Out:
http://www.microsoft.com/MSPress/books/9801.aspx#AboutTheBook

Word FAQ: http://mvps.org/word
TechTrax eZine: http://mousetrax.com/techtrax/
MVP FAQ site: http://mvps.org/
 
A

Aggie G

I add the macro as listed, but am i supposed to enter something in between
the paranthesis and should I replace the (1)? When I run the macro it is
giving me an error message at this part.
 
G

Graham Mayor

No, you leave the 1 as it stands. The macro should read

Sub FollowLink()
Selection.Hyperlinks(1).Follow
End Sub

Insert your macrobutton field to run that macro, using the inserted
hyperlink as the prompt. Run the macro by clicking the macrobutton field. If
you run it any other way it will give you a Runtime Error 5941 error
message, because the macro alone is not associated with a hyperlink.


--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
G

Graham Mayor

I had a look at your document, which seems to contain some minor corruption.
I added the macro

Sub FollowLink()
Selection.Hyperlinks(1).Follow
End Sub

to the template (presumably you have it in normal.dot - where other users
won't see it) saved it as a template into the templates folder of my PC and
the function worked correctly when I changed the hyperlinked document to one
I actually had present. In my case
{ MacroButton FollowLink { HYPERLINK
"D:/My%20Documents/Test/Dates%20data.xls" } }

I was also a bit suspicious of the path in your hyperlink
{ MacroButton FollowLink { HYPERLINK " \S:\Project Review Committee\Action
Steps Form Template.xlt" } }
which not only has a space in the path after the first quote, but has a
single backslash before the network drive letter? I can't see that working?

It helps if you create the hyperlink in another document, using the Insert
Hyperlink tools. Test that it works, then copy and paste it into the
macrobutton field. Lock the template and save it.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top