View Single Post
  #2   Report Post  
Posted to microsoft.public.word.docmanagement
Greg Maxey
 
Posts: n/a
Default replacing period-space with period-space-space

Boris,

Here is a macro that will ensure two spaces after full stop puncuation:

Sub TwoSpacesAfterSentence()

Dim oRng As Range
Set oRng = ActiveDocument.Range
With oRng.Find
.ClearFormatting
.MatchWildcards = True
.Text = "([.\!\?]) ([A-Z])"
.Replacement.Text = "\1 \2"
.Execute Replace:=wdReplaceAll
End With

End Sub

--
Greg Maxey/Word MVP
See:
http://gregmaxey.mvps.org/word_tips.htm
For some helpful tips using Word.


BorisS wrote:
I need to do a find and replace on all single spaces after periods,
and replace with two spaces. The problem, of course, is that if I do
just a straight period-space conversion, I will include the places
that already have a period and two spaces after them (with the find
just ignoring the second space in its search).

How can I indicate that I only want it to find periods with a space
and some character after the space, as the find criteria? And then
also importantly, how do I tell it to replace the period-space with
period-two space, and then leave the character untouched?

Thanks.