Hyperlinks in Protected Documents

by Allen Wyatt
(last updated January 27, 2017)

2

Word allows you to create protected forms that come in handy for some purposes. When you protect a document, then the user can only fill in certain fields or use a limited subset of Word commands and options. One feature that is no longer available when you protect a document is hyperlinks—they are no longer clickable.

What if you need your hyperlinks to be active in a protected document? One solution is to remember that protection is applied by section in a document. Thus, you could put a section break before the hyperlink and one after it. Your document would then have three sections, and you could protect the first and third. Leave the section containing the hyperlink unprotected, and it will still be clickable.

The drawback to this approach, of course, is that anything in the unprotected section—including the hyperlink—is editable. If you don't want the hyperlink to be editable, then you need an entirely different solution. One that will work is to use a MacroButton field to display the hyperlink. The MacroButton field also specifies a macro to run when it is clicked, so the macro can be used to initiate the link to the remote resource.

The macro you would use is as follows:

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

Within the document, you use the following compound field:

{ MACROBUTTON GotoLink { HYPERLINK "http://word.tips.net"} }

Remember that this is a compound field—a field within a field. Each set of field braces is inserted with the Ctrl+F9 shortcut. When the result of the field is displayed, the specified URL is visible, but when it is clicked on, the macro GotoLink is executed. It is the macro that follows the hyperlink to its destination.

You can find more information about this technique at the following Word MVP page:

http://wordmvp.com/FAQs/TblsFldsFms/HLinksInForms.htm

WordTips is your source for cost-effective Microsoft Word training. (Microsoft Word is the most popular word processing software in the world.) This tip (3801) applies to Microsoft Word 97, 2000, 2002, and 2003.

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

Differences between Deleting, Clearing, and Cutting

When getting rid of text from your document, Word allows you to delete, clear, or cut. Here are the differences between these ...

Discover More

Avoiding a Section Break Booby Trap

Section breaks got your document formatting all messed up? It could be because of the way you added the section breaks in the ...

Discover More

Basing Headers and Footers on the Previous Section

Word treats the headers and footers in a document independently, based on the section in which they appear. This means that ...

Discover More

Comprehensive VBA Guide Visual Basic for Applications (VBA) is the language used for writing macros in all Office programs. This complete guide shows both professionals and novices how to master VBA in order to customize the entire Office suite for their needs. Check out Mastering VBA for Office 2010 today!

MORE WORDTIPS (MENU)

Setting Web Fonts

If you intend to generate a Web page from your document, you need to be concerned with the fonts that Word will use. Here's ...

Discover More

Specifying Your Target Monitor

When using Word to create content that will end up on the Web, it is helpful to know the probably screen resolution of those ...

Discover More

Building Your Own Web Page

Want to build a Web page using Word? Here's an overview of how it works.

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 for this tip:

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. 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 three minus 0?

2016-03-05 19:42:40

john dolan

Hi. I have a protected word doc with content controls and need to have multiple hyperlinks to other places within the same document. I used the macro
Sub GotoLink()
Selection.Hyperlinks(1).Follow
End Sub
successfully for the 1st hyperlink but it does not work for any additional hyperlinks. Can you help? thanks, john


2013-04-27 12:12:28

martin kessler

I did not check any of the boxes as I feel my comment is otherwise.

I do not know if my concern has to do with word or not. Let me explain.

I see on many internet sites a writer will say somethink like "You can read more here and here", where "here" and "here" are called "linkable" to some other document or source and are shown in a blue color.

How do they do that? I'm a 90 year old geezer who is too timid to ask my grandaughter. I realize it may be done by a certain series of clicks but there's the rub--I do not know the sequence. Is it really that simple? Would you be kind to give me a reference -- a step-by-step reference I might read as lucid and as instructive as the tips you provide for word.

Thank you


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.

Links and Sharing
Share