clean extra space
Hello,
I tried to change the macro below so that in one run it will delete an unnecessary space next to the + - signs
Is it possible?
I can duplicate the macro and put one mark per macro but that leaves me with a lot of shortcuts.
Thanks
Sub MFindReplacePARA()
Dim aDoc As Document, strFindText As String, strReplaceText As String
strFindText = "^p^p"
strReplaceText = "^p"
strFindText = " +"
strReplaceText = "+"
strFindText = "+ "
strReplaceText = "+"
strFindText = "- "
strReplaceText = "-"
strFindText = " -"
strReplaceText = "-"
For Each aDoc In Application.Documents
With aDoc.Range.Find
.Text = strFindText
.Replacement.Text = strReplaceText
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = True
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
.Execute Replace:=wdReplaceAll
End With
Next aDoc
End Sub
|