Jump to content

Recommended Posts

Posted

Hi,

I have downloaded multiple pages of information from the Web and on each line there is a hyperlink. I would like to preserve the text and remove all hyperlinks without going line by line. I tried going into Autocorrect/Autoformat and unchecking the hyperlink box, but this didn't do anything. Any ideas?

Thank you very much!

Steve


Posted

You can do it with the following macro:

Sub removehyperlink()

Set myRange = ActiveDocument _
.Range(Start:=ActiveDocument.Content.End - 1)
Count = 0
For Each aHyperlink In ActiveDocument.Hyperlinks
Count = Count + 1
With myRange
aHyperlink.Delete
End With
Next aHyperlink

End Sub

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...