In a Word Document when we paste some data from some source (e.g. Websites). We find that there are some hyperlinks copied into it.
Sometimes we want to change the text of all these hyperlinks to a particular word.
When it is needed?
It is useful where we actually want to remove all these hyperlinks along with the text. Say the document is 100 pages long. There are 200 links (with different Text). You want to remove all this hyperlinked text.
Either you could do it manually or by creating a Macro.
Following is the code for Macro:
Sub FixHyperlinks1()
Dim hyp As Hyperlink
Dim sLink As String
For Each hyp In ActiveDocument.Hyperlinks
hyp.TextToDisplay = “####”
Next hyp
End Sub
Change #### to the Text you want it to be replced.