Can anyone help in coding a new macro (without using "find and replace" feature) for erasing the highlights of words or sentences in the document.
Right now I am using the following macro through "find and replace", which causes difficulty in using find feature to find something else, as with previous macro use special charecters (that are in find and replace feature) are saved there. When I do a find for something else I have to delete those characters,e.g., "^?" and "^&".
The macro I am using is this:
[vba]Sub Eraser()
'
' Macro1 Macro
' Macro recorded 01/28/2007 by Accolade
'
Selection.Find.ClearFormatting
Selection.Find.Highlight = True
Selection.Find.Replacement.ClearFormatting
Selection.Find.Replacement.Highlight = False
With Selection.Find
.Text = "^?"
.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
End Sub[/vba]