Hi Shawn,
i'm not too good with this hyperlink stuff.
however, this one seems to work.
Sub FindAndReplaceWithHypertextImproved2()
Dim rDoc As Range ' range replace
Dim sFnd As String ' string to be found
Dim sHpl As String ' hyperlink
Dim sDsp As String ' hyperlink display
Dim oHpl As hyperlink
sFnd = "August"
sHpl = "
http://www.microsoft.com"
sDsp = "Microsoft"
Set rDoc = ActiveDocument.Range
ResetSearch
With rDoc.Find
.Text = sFnd
.Wrap = wdFindStop
Do While .Execute
Set oHpl = ActiveDocument.Hyperlinks.Add _
(rDoc, Address:=sHpl, _
TextToDisplay:=sDsp)
rDoc.End = rDoc.End + Len(sDsp)
rDoc.Collapse wdCollapseEnd
Loop
End With
oHpl.Follow
End Sub
--
Greetings from Bavaria, Germany
Helmut Weber, MVP WordVBA
Win XP, Office 2003
"red.sys" & Chr$(64) & "t-online.de"