Jump to content

Search and replace hyperlinks


attroll
 Share

Recommended Posts

I created a document a long while back in word with numerous hyperlinks in it. But since then one of the hyperlinks has changed and I have to go through the whole document and find all the hyperlinks with this address and change them all. Is there was way to do a Find and Replace for the hperlink itsself without doing them one at a time? I know you can do it with text in the document but can you do the same thing with the hyperlink?

Link to comment
Share on other sites

  • 2 weeks later...

I created a document a long while back in word with numerous hyperlinks in it. But since then one of the hyperlinks has changed and I have to go through the whole document and find all the hyperlinks with this address and change them all. Is there was way to do a Find and Replace for the hperlink itsself without doing them one at a time? I know you can do it with text in the document but can you do the same thing with the hyperlink?

Yup it shouldn't be too hard to code it in VBA .

For Each hLink In Documents(1).Hyperlinks   ' where documents(1) is your docuement
If InStr(hLink.Address, "YOURHYPERLINK") <> 0 Then
hLink.address = "NEW HYPERLNIK"
End If
Next hLink

Hope this helps :)

Regards

cyph

Edited by cypher_soundz
Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.


×
×
  • Create New...