Written by Allen Wyatt (last updated August 24, 2024)
This tip applies to Word 97, 2000, 2002, and 2003
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
Note:
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.
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!
Adding a hyperlink to s text selection is easy to do in Word. All you need to do is make a couple of clicks and specify ...
Discover MoreIf the Web toolbar pops up and drives you crazy, this tip can help. Here you learn how to turn off the pop-up nature of ...
Discover MoreActive hyperlinks can be a desired feature in some types of documents. If you want to replace multiple instances of plain ...
Discover MoreFREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."
There are currently no comments for this tip. (Be the first to leave your comment—just use the simple form above!)
Got a version of Word that uses the menu interface (Word 97, Word 2000, Word 2002, or Word 2003)? This site is for you! If you use a later version of Word, visit our WordTips site focusing on the ribbon interface.
Visit the WordTips channel on YouTube
FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."
Copyright © 2024 Sharon Parq Associates, Inc.
Comments