Word - Remove all Hyperlinks

 

Two Macros to remove Hyperlinks (they leave the text, but remove the link from the text) :

Macro 1) this one works great and is simpler than the second one. However, I am including the second one, just in case it has some extra functionality that I am not yet aware of.

Dim i As Long
For i = ActiveDocument.Hyperlinks.Count To 1 Step -1
ActiveDocument.Hyperlinks(i).Delete
Next i


Macro 2) also works great

Dim oField As Field
'Dim oRange As Range

For Each oField In ActiveDocument.Fields
If oField.Type = wdFieldHyperlink Then
'Set oRange = oField.Result
oField.Unlink
'oRange.Style = wdStyleHyperlink
End If
Next

Set oField = Nothing
'Set oRange = Nothing

NOTE: If the document contains fields other than Hyperlinks then this macro will remove the links from just those fields that are Hyperlinks and leave the others alone. Note that if you want to keep the Hyperlink style then remove the apostrophe ( ' ) from the front of the lines that contain oRange. Otherwise this will convert them to text just as the Unlink Fields command does.