Locate ALL CAPS in a paragraph
Hi to all!
I have this macro:
Sub DeleteCap3Word()
With Selection.Find
.ClearFormatting
.Text = " ([A-Z][A-Z][A-Z]) "
.Replacement.Text = " "
.Forward = True
.Wrap = wdFindContinue
.Format = True
.MatchCase = True
.MatchWholeWord = True
.MatchWildcards = True
.MatchSoundsLike = False
.MatchAllWordForms = False
.Execute
While .Found
Selection.Find.Execute Replace:=wdReplaceAll
Wend
End With
End Sub
My problem is that it looks for all 3-letter words in all caps including those that I need (ex. MRI, PSA, USB, etc.).
Is there a way to have exceptions so that certain acronyms which I need is not deleted and only 3-letter all caps word which needs to be deleted?
Thank you in advance for your help!!!
|