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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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