Hack 28 Unlink Every Hyperlink![]() ![]() always hard to wrangle, hyperlinks tend to stick around your documents like unwelcome guests at a party. Here's how to show them the door.Maybe it's because they're so difficult to edit; maybe it's the tacky combination of blue and underline; or maybe it's having to continually dismiss that web browser or email editor you didn't mean to open. Whatever the reason, many users have just one thing to say about hyperlinks in Word: "How do I get rid of them!?"
and choose Remove Hyperlink from the shortcut menu, as shown in Figure 4-5. Figure 4-5. Removing a hyperlink with the Hyperlink shortcut menu![]() Ctrl-Shift-F9. However, this key command unlinks all the fields in the current selection. So selecting all the text in your document and then pressing Ctrl-Shift-F9 would remove all the hyperlinks and unlink every other field in your document, making it a poor choice for the task at hand.Word offers no built-in way to unlink just every hyperlink in a document all at once. However, you can use a macro to get the job done. 4.3.1 The CodePlace this macro in the template of your choice [Hack #50] and either run it from the Tools dialog or put a button for it on a menu or toolbar [Hack #1].Running the following macro achieves the same result as selecting each hyperlink and choosing Remove Hyperlink from the shortcut menu: Sub RemoveAllHyperlinks( )Notice that while the shortcut menu uses the term "remove," in this macro, each hyperlink is "deleted." Though the terminology is inconsistent, the result is the same: the text remains in your document, but it is no longer an active hyperlink and no longer appears as blue and underlined.
4.3.2 Hacking the HackWhen a hyperlink is inserted into your document (either manually or automatically), the Hyperlink character style is applied to its text. The Hyperlink character style is just like any other character style in Word. You can see it displayed in the Styles pull-down menu on the Formatting toolbar, as shown in Figure 4-6. Figure 4-6. Hyperlink is just another built-in character style![]() stand the blue underlining, you can change it. Select Format 2000), choose the Hyperlink style, and click the Modify button. Next, click the Format button and choose Font. The Font dialog, shown in Figure 4-7, lets you change the style to suit your tastes. Figure 4-7. Choosing a more mellow format for Word hyperlinks![]() it. The reverse, however, is not truethat is, if you select a hyperlink and alter its styling (e.g., remove the underlining), you will still be left with a fully "clickable" hyperlink.
Hyperlink character style applied to the text, modify the macro as follows: Sub RemoveHyperlinksKeepStyle( )To completely remove all the hyperlinks in a document, including their text, change the RemoveAllHyperlinks macro to the following: Sub ReallyRemoveAllHyperlinks( ) |