View Single Post
 
Old 05-09-2018, 12:35 PM
gmaxey gmaxey is offline Windows 7 32bit Office 2016
Expert
 
Join Date: May 2010
Location: Brasstown, NC
Posts: 1,429
gmaxey is a jewel in the roughgmaxey is a jewel in the roughgmaxey is a jewel in the roughgmaxey is a jewel in the rough
Default

Code:
Sub ScratchMacro()
'A basic Word macro coded by Greg Maxey, http://gregmaxey.com/word_tips.html, 5/9/2018
Dim oRng As Word.Range
  Set oRng = ActiveDocument.Range
  With oRng.Find
    .Text = "  "
    .Replacement.Text = "***"
    .MatchWildcards = True
    .Execute Replace:=wdReplaceAll
  End With
  Set oRng = ActiveDocument.Range
  With oRng.Find
    .Text = "(*) (*)"
    .Replacement.Text = "\1\2"
    .MatchWildcards = True
    .Execute Replace:=wdReplaceAll
  End With
  Set oRng = ActiveDocument.Range
  With oRng.Find
    .Text = "***"
    .Replacement.Text = " "
    .Execute Replace:=wdReplaceAll
  End With
lbl_Exit:
  Exit Sub
End Sub
__________________
Greg Maxey
Please visit my web site at http://www.gregmaxey.com/
Reply With Quote