This macro should do what you want.
Save it in your Normal template (ALT+F11). You can edit it to find other keywords. Just add these two lines for each word:
Selection.Find.Text = "NextKeyword"
Selection.Find.Execute Replace:=wdReplaceAll
They would go near the end of the macro. (Leave the last 2 lines as they are, they clean up the Find and Replace Dialog Box so it will work normally the next time you attempt to use it.)
Copy the text of any email and paste it into a Word doc window.
Run the macro named HighlightItems (ALT+F8)
This is the macro code:
Sub HighlightItems()
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = ""
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Replacement.Highlight = True
Selection.Find.Replacement.Text = "^&"
Selection.Find.Text = "audio"
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.Text = "video"
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.Text = "electronics"
Selection.Find.Execute Replace:=wdReplaceAll
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
End Sub
|