Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Autocorrect a single space after period at end of sentence

Add the following macro to a toolbar button or keyboard shortcut
http://www.gmayor.com/installing_macro.htm and it will remove all extra
spaces from your document.

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


--

Graham Mayor - Word MVP

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

Michelle wrote:
I am trying to train myself to not put 2 spaces between sentences
anymore. I have changed the Spelling & Grammar setting to 1 space.
This however does not automatically change the spacing. I thought
maybe there would be a way to autocorrect this so that as I am typing
it corrects itself automatically instead of having to change it in
spellcheck. I can't seem to get the spellcheck to "correct all" and
when I try to find and replace all, well it doesn't work right. If
you know of a way to make this autocorrect that would be great.



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
hitting space bar prints a period/dot sutton6 Microsoft Word Help 1 July 5th 06 03:57 PM
Find and Replace - Period and space at end of sentence Rich58 Microsoft Word Help 3 June 20th 06 11:43 PM
How do I set up Autocorrect: always one space after a period Touseef Microsoft Word Help 1 March 29th 06 08:43 PM
replacing period-space with period-space-space BorisS Microsoft Word Help 10 February 20th 06 04:26 PM
a period shows in key press of space bar mikedane New Users 2 February 20th 05 09:37 AM


All times are GMT +1. The time now is 05:19 AM.

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

About Us

"It's about Microsoft Word"