View Single Post
  #3   Report Post  
Posted to microsoft.public.word.docmanagement
Stefan Blom[_3_] Stefan Blom[_3_] is offline
external usenet poster
 
Posts: 6,897
Default Find all instances of a certain word and replace with hyperlinkof same word

For more on macros, see http://www.gmayor.com/installing_macro.htm.

--
Stefan Blom
Microsoft Word MVP



On 2012-05-31 17:17 (GMT+1), Stefan Blom wrote:
One possibility is to loop all hyperlink objects in a document and set
the address depending on the display text:

Dim h As Hyperlink
For Each h In ActiveDocument.Hyperlinks
If h.TextToDisplay = "project" Then
h.Address = "http://word.mvps.org"
End If
Next h