Search for Free Tech Tips
Browse
Print Email

How to Remove Multiple Hyperlinks in MS Word

If the hyperlinks are the only fields in the document, or if you don't care
about the other fields, you can do it in the GUI with two keystrokes.

Ctrl+A -- Select all
Ctrl+Shift+F9 -- Unlink fields

This converts all fields to plain text of their displayed results.

If there are other fields that need to remain as fields, use this macro to
unlink only the hyperlinks:

Sub UnlinkHyperlinks()
Dim nHL As Long
For nHL = 1 To ActiveDocument.Hyperlinks.Count
ActiveDocument.Hyperlinks(1).Delete
Next nHL
End Sub

Two notes:
- The .Delete method in VBA does the same as Unlink in the GUI -- it will
leave the display text in place. To remove the entire thing, you need to do
.Hyperlinks(1).Range.Delete.
- As each hyperlink is deleted, the next one becomes .Hyperlinks(1). This
technique is needed because the Hyperlinks collection doesn't work properly
in a For Each loop in which the number of hyperlinks is being changed by
.Delete or .Add.

 
 
1

Article Information

You want to remove all hyperlinks in a Microsoft Word document

Creation Date March 22,2008
Article Tags hyperlink Microsoft
Advertisement

Can't find what you're looking for?


Submit a question or problem.

Infotree Web Services Website Designed &
Developed By
© 2008 freetechtips.com. All rights reserved.