Code:
Sub ScratchMacroI()
'A basic Word macro coded by Greg Maxey
Dim oRng As Range
Set oRng = ActiveDocument.Range
With oRng.Find
.Text = " "
.MatchWildcards = True
While .Execute
oRng.InsertBefore "~"
oRng.InsertAfter "~"
oRng.HighlightColorIndex = wdYellow
oRng.Collapse wdCollapseEnd
Wend
End With
lbl_Exit:
Exit Sub
End Sub
Sub ScratchMacroII()
'A basic Word macro coded by Greg Maxey
Dim oRng As Range
Set oRng = ActiveDocument.Range
With oRng.Find
.Text = " "
.MatchWildcards = True
While .Execute
oRng.MoveStart wdCharacter, -1
oRng.MoveEnd wdCharacter, 1
oRng.HighlightColorIndex = wdYellow
oRng.Collapse wdCollapseEnd
Wend
End With
lbl_Exit:
Exit Sub
End Sub