J
JayneBartram
Hi, I've been using this really helpful macro offered by Allen Wyatt
on his "Word tips" web page.
Sub TwoSpaces()
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = "([.\?\!]) {1,}"
.Replacement.Text = "\1 "
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchWildcards = True
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub
It replaces any number of spaces after a period with 2 spaces, as
required by my UK organisation.
What it doesn't do is add 2 spaces after a period if there is
currently no space after said period.
This punctuation error occurs often here, so please can anyone tell me
how the above macro can be modified to take care of this extra
problem, if possible?
Regards,
Jayne Bartram
on his "Word tips" web page.
Sub TwoSpaces()
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = "([.\?\!]) {1,}"
.Replacement.Text = "\1 "
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchWildcards = True
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub
It replaces any number of spaces after a period with 2 spaces, as
required by my UK organisation.
What it doesn't do is add 2 spaces after a period if there is
currently no space after said period.
This punctuation error occurs often here, so please can anyone tell me
how the above macro can be modified to take care of this extra
problem, if possible?
Regards,
Jayne Bartram