How to replace words on the hyperlinks

A

avkokin

Hello. I have one document where there is many words as hyperlinks. I
need to replace these words on the direct links (e.g., instead of
Google must be the link http://google.com). How I can do it? Thanks.
 
H

Helmut Weber

Hi Avkokin,

Try:

Sub Test3991()
Dim oHpl As Hyperlink
For Each oHpl In ActiveDocument.Hyperlinks
oHpl.TextToDisplay = oHpl.Address
Next
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top