When I use the Find dialog box there is a checkbox to highlight all items found in document. When you check it, the Find button changes to Find All. When I click Find All it selects all occurrences of every match. When I use the macro recorder it creates the following code:
Selection.Find.ClearFormatting With Selection.Find .Text = "Amount" .Replacement.Text = "" .Forward = True .Wrap = wdFindContinue .Format = True .MatchCase = False .MatchWholeWord = False .MatchWildcards = False .MatchSoundsLike = False .MatchAllWordForms = False End With
For some reason the macro recorder left out the execute statement. It must have left something else out because when I add the execute statement right before the end with, and then run it, it finds and selects only the first occurrence. How do I change the macro so that it finds ALL matches and selects all occurrences?
As a side note, one nice thing about using Find All is that the dialog box actually tells you how many occurrences the text is found in the document.