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

Then it seems that running this macro once would be easier yet:

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
.Text = "([.\!\?]) {3,}([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.


Anne Troy wrote:
Hi, Boris. The easiest way to do that, which I've used extensively,
is to replace period-space with period-space-space, and then to run a
replace period-space-space-space with period-space-space until 0
replacements are made.

************
Hope it helps!
Anne Troy
www.OfficeArticles.com
Check out the NEWsgroup stats!
Check out: www.ExcelUserConference.com

"BorisS" wrote in message
news
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.
--
Boris