Reply
 
Thread Tools Display Modes
  #1   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



Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can nonbreaking spaces be made elastic when full-justifying? Paul Robertson Microsoft Word Help 1 June 15th 06 05:11 PM
I want to add spaces after a right tab Nigel Greensitt Page Layout 2 December 28th 05 10:59 AM
Unwanted spaces in address on envelopes jen Mailmerge 3 September 26th 05 05:37 AM
How can I replace single spaces with double spaces in a docume TJ Microsoft Word Help 1 February 27th 05 04:22 AM
How do I get Word to stop putting extra spaces after a period whe. Wants a Manual I Can Hold In My Hand! Microsoft Word Help 2 February 2nd 05 12:27 AM


All times are GMT +1. The time now is 08:07 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"