Help with a macro
I wrote this macro to find all the hidden text in a document, and replace it with nothing (delete it). The problem is, it is doing the EXACT OPPOSITE. It is finding all the NOT hidden text and deleting it. After I run the macro, if I click on "Edit-Replace" it says "Not Hidden" in the find window. It should just say "Hidden." What am I doing wrong?
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = ""
.Font.Hidden = True
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
|