M
mcp6453
The following macro works well to turn two or more sequential spaces
into a single space:
With Selection.Find
.ClearFormatting
.Replacement.ClearFormatting
.Text = " {2,}" 'Search for two or more spaces
.Replacement.Text = " "
.Forward = True
.Wrap = wdFindContinue
.MatchWildcards = True 'Set this to true.
.Execute Replace:=wdReplaceAll
End With
However, after the macro runs, "MatchWildcards" remains set to True. How
can I set it to False? What other clean up would be a good practice to
follow after running this macro?
into a single space:
With Selection.Find
.ClearFormatting
.Replacement.ClearFormatting
.Text = " {2,}" 'Search for two or more spaces
.Replacement.Text = " "
.Forward = True
.Wrap = wdFindContinue
.MatchWildcards = True 'Set this to true.
.Execute Replace:=wdReplaceAll
End With
However, after the macro runs, "MatchWildcards" remains set to True. How
can I set it to False? What other clean up would be a good practice to
follow after running this macro?