View Single Post
  #5   Report Post  
Posted to microsoft.public.word.newusers
Graham Mayor
 
Posts: n/a
Default Eliminating redundant spaces

The best you can hope for is a macro attached to a toolbar button or
keyboard shortcut:

Sub ClearSpaces()
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = "[ ]{2,}"
.Replacement.Text = " "
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
Selection.Find.Execute replace:=wdReplaceAll
End Sub


--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org


Scott Meyers wrote:
Dawn Crosier, MVP wrote:
I find and replace two spaces with one space quite often. It is not
necessary to use wildcards or any other character other than the
space bar when filling in the Find and Replace textboxes.

Also, you can turn on grammar checking to give you a visual clue
that you just typed a double space.

Tools, Options, Spelling & Grammar. Locate the Settings button. In
the Grammar dialog box, change the Spaces required between sentences
to 1.


I was aware of these options. What I'm looking for is a way to get
Word to take care of the problem automatically without any
intervention on my part. Is there no way to set this up?

Thanks,

Scott