The page you requested does not exist. A search for search replace windows macro vba resulted in this page.

Search and Replace in Windows Macro (vba)

This worked for me:

        With Selection.Find^M
           Selection.Find.ClearFormatting^M
           Selection.Find.Replacement.ClearFormatting^M
        ^M
           .Text = "<^#;"^M
           .Replacement.Text = "<" & Counter & ";"^M
           .Forward = True^M
           .Wrap = wdFindStop^M
           .Format = False^M
           .MatchCase = False^M
           .MatchWholeWord = False^M
           .MatchWildcards = False^M
           .MatchSoundsLike = False^M
           .MatchAllWordForms = False^M
        End With^M
^M
    ' Execute the change - can be wdReplaceAll to do a global search and replace^M
        Selection.Find.Execute Replace:=wdReplaceOne^M
^M
    ' Move after the selection^M
        Selection.MoveRight Unit:=wdCharacter, Count:=1^