Eliminating redundant spaces

S

Scott Meyers

I find that when I enter text in Word, it is not uncommon for me to type
multiple spaces between words or after punctuation, etc., especially when I'm
editing existing text. I'd like Word to automatically eliminate all spaces
after the first one. (This feature is called "Smart Spaces" in FrameMaker, the
word processing program I've used up to this point, and that feature is probably
one of the reasons I'm used to hitting the space bar too often.) I can't find
an autocorrect feature that does what I want, and my attempt to create an
autocorrect entry that would replace two adjacent spaces with one space failed,
because Word doesn't seem to accept two spaces as text that can be matched and
replaced.

Is there a way for me to get this functionality? I'm using Word 2002.

Thanks,

Scott
 
D

Dawn Crosier, MVP

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.

--
Dawn Crosier
Microsoft MVP
"Education Lasts a Lifetime"

This message was posted to a newsgroup, Please post replies and questions
to the group so that others can learn as well.
 
S

Scott Meyers

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
 
C

Chuck Davis

Scott,
Word can't correct all users errors automatically. The programmers have come
a long way since the first release, but there is just so much that can be
overcome.
 
G

Graham Mayor

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


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top