find capitalized words and replace with a text
Thanks a lot, I appreciate your help!
In the meantime I found this macro is working OK for me. (my intention was to
change any word in the selected text to a big dot, word "Canada" was just an
example here.
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find.Replacement.Font
.Size = 18
.Bold = True
.Color = wdColorRed
End With
With Selection.Find
.Text = "[A-Z]*[A-Z]"
.Replacement.Text = " €¢ "
.Forward = True
.Wrap = wdFindStop
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
Selection.Find.Execute Replace:=wdReplaceAll
Selection.MoveDown Unit:=wdLine, Count:=1
Best regards,
Mark
|