Hi,
like this:
Sub test8888()
Dim rPrg As Range
Set rPrg = ActiveDocument.Paragraphs(2).Range ' e.g.
ResetSearch
With rPrg.Find
.Text = "o"
.Replacement.Text = "x"
.Wrap = wdFindStop
.Execute Replace:=wdReplaceAll
End With
ResetSearch
End Sub
Public Sub ResetSearch()
With Selection.Find
.ClearFormatting
.Replacement.ClearFormatting
.Text = ""
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
.Execute
End With
End Sub
Greetings from Bavaria, Germany
Helmut Weber, MVP
"red.sys" & chr(64) & "t-online.de"
Word 2002, Windows 2000