FARM macro for general replace (Chapter 3.2)

posted Feb 10, 2014, 2:39 PM by Wolf O'Rourc   [ updated Feb 10, 2014, 2:42 PM ]
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
    .Text = "#cc"
    .Replacement.Text = "Cathrine Carlisle"
    .Forward = True
    .Wrap = wdFindContinue
    .Format = False
    .MatchCase = False
    .MatchWholeWord = False
    .MatchByte = False
    .MatchWildcards = False
    .MatchSoundsLike = False
    .MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll

With Selection.Find
    .Text = "#dp"
    .Replacement.Text = "Deborah Perry"
End With

Selection.Find.Execute Replace:=wdReplaceAll
Comments