K
kheisler6
I'm trying to FIND every instance of a period (".") and REPLACE it with
a period and a space (". "). The code I've come up with works. How do I
edit the code so that it ignores the operation when it finds a period
followed immediately by a comma (".,"). I would like such instances to
be remain untouched.
Thanks. - Kurt
###
' AddSpace Macro
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = "."
.Replacement.Text = ". "
.Forward = True
.Wrap = wdFindContinue
End With
If Selection.Find.Execute Then
Selection.Find.Execute Replace:=wdReplaceAll
End If
a period and a space (". "). The code I've come up with works. How do I
edit the code so that it ignores the operation when it finds a period
followed immediately by a comma (".,"). I would like such instances to
be remain untouched.
Thanks. - Kurt
###
' AddSpace Macro
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = "."
.Replacement.Text = ". "
.Forward = True
.Wrap = wdFindContinue
End With
If Selection.Find.Execute Then
Selection.Find.Execute Replace:=wdReplaceAll
End If