Spaces after Periods

J

Joe McGuire

Lots of stuff that I paste into Word from other sources was written with a
single space after a period (or other puncuation) ending a sentence. All of
these then display with little green marks showing that Word thinks there is
a problem (in this case Word is correct; I have always put 2 spaces after
sentence punctuation, even before Bill Gates got a job). I can then
laborious wade through the entire document and fix each instance one at a
time. Oy!! Is there a setting in Word that will automatically correct that
spacing after punctuation? If not, what sort of syntax could I use in Find
and Replace?
 
G

Graham Mayor

You can tell Word's grammar checker not to flag this as an error - which is
what I would recommend, as this antediluvian practice is not required with
proportional fonts used by modern word-processing systems. It is a hangover
from the days of manual typewriters.

However, if you insist, a *wildcard* search for

(.)([ ])([! ])
replace with
\1\2\2\3

will replace all single spaces with double spaces and will ignore those that
are already double spaced.

If you want to include question marks and exclamation marks the search
string would be
([.\!\?])([ ])([! ])
the replace string stays the same


--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
S

Suzanne S. Barnhill

As others have mentioned, the practice of using two spaces after punctuation
is a holdover from typewriter practice and is based on the spacing of
monospaced fonts. Unless you are using Courier New or some other monospaced
font (almost all fonts, including the default Times New Roman, are
proportional), a single space after punctuation is adequate and
conventional.

If you make the sensible decision to join the rest of the world in this
practice, then what you need to do is change the setting in Word's grammar
checker (Tools | Options | Spelling & Grammar: Grammar: Settings: Spaces
required between sentences). There are (in Word 2003) three possible
settings: "1," "2," and "Don't check." It sounds as if you currently have
"2" selected. You can change to "1" or "Don't check," or (even more
sensibly) you can turn off grammar checking altogether and use your own good
sense.
 
J

Joe McGuire

Thanks, Sue, and thanks to the others who responded with speed that still
has my head spinning. Yes, indeed, I seem to be a holdover (I actually use
Courier New for some legal writing) but I accept the invitation to join the
21st Century. However, I don't find any references to spaces after
sentences in Spelling and Grammar in Word 2003 as you suggest. I tried
Word's Help which was a laugh, of course. Is there another location for
that setting?

(My main reason for wanting control over the spacing issue is my desire for
consistency in a finished document. I actually use Courier New for some
legal writing. But my main concern is that I would like all the
post-punctuation spacing to look the same, even with proportional fonts like
Times New Roman. If I wrote everything myself, there would be no problem.
The problem--and it may be a small one, to be sure--arises when I paste
other text into mine.)

(Curiously, I see a check mark in Spelling and Grammar) under Proofing Tools
for "Use German post-reform rules". Like so many other things in Word I
can't recall doing that, although it may have come up in the course of some
of my writing in German.)
 
J

Joe McGuire

Thanks. Pasted the macro and after a slight hitch (somehow ended up with
two "End sub" lines) it works very well.
 
J

Joe McGuire

Thanks. Actually, I nearly always use Paste Special, Unformatted Text to
avoid even more formatting issues. Word then picks up the one space after
punctuation as an error and offers a correction. Unfortunately, you can
only fix the errors one-at-a-time. Doing this through an entire document
gets pretty tedious. I got great suggestions from others in this forum for
dealing with this--along with a few snickers that I seem to be stuck in the
typewriter mindset--does anybody remember typewriters?
 
S

Suzanne S. Barnhill

I described the location of this setting in what I thought was minute
detail, but here goes again.

1. On the Tools menu, select Options.

2. In the Options dialog, select the Spelling & Grammar tab.

3. On the Spelling & Grammar tab, in the Grammar section, click the button
labeled Settings...

4. In the Grammar Settings dialog, at the top, under Require, is the setting
for "Spaces required between sentences." There is a dropdown list box for 1,
2, and "don't check." Select your preference.
 
P

Poprivet

Instead of spell checking that way, select the whole document before
clicking on spell check. Then you'll have the Change All and Ignore All
etc., available to you.

Pop`
 
J

Joe McGuire

Greg--I found one miniscule problem running this macro. It does a great job
of making sure there are two spaces after the end of a sentence. However,
it does the same thing any time a period (or other punctuation) appears and
is apparently followed by at least 1 space. Thus somebody's middle initial
would end up with two spaces. Hardly the end of the world. It does not do
the same for periods in the middle of a word, as in microsoft.com or a
company name, such as Dewey Cheatham & Howe P.C. .
 
G

Greg Maxey

Joe,

Yes, you are right. The following should take care of most cases:

Sub TwoSpacesAfterSentence()
Dim oRng As Range
Set oRng = ActiveDocument.Range
With oRng.Find
.ClearFormatting
.MatchWildcards = True
.Text = "(*{2})([.\!\?]) ([A-Z])" 'Changed
.Replacement.Text = "\1\2 \3" 'Changed
.Execute Replace:=wdReplaceAll
.Text = "([.\!\?]) {3,}([A-Z])"
.Replacement.Text = "\1 \2"
.Execute Replace:=wdReplaceAll
'This should prevent most cases of improper double spacing 'Added
'in names (e.g., F. Lee Bailey, George W. Bush, etc.) 'Added
.Text = "([!A-Z][A-Z].) ([A-Z])"
'Added
.Replacement.Text = "\1 \2"
'Added
.Execute Replace:=wdReplaceAll
'Added
End With
End Sub

There still could be nuances that this code doesn't correct or "over
corrects" :-(
 
J

Joe McGuire

Works like a charm! Thanks!

Greg Maxey said:
Joe,

Yes, you are right. The following should take care of most cases:

Sub TwoSpacesAfterSentence()
Dim oRng As Range
Set oRng = ActiveDocument.Range
With oRng.Find
.ClearFormatting
.MatchWildcards = True
.Text = "(*{2})([.\!\?]) ([A-Z])" 'Changed
.Replacement.Text = "\1\2 \3" 'Changed
.Execute Replace:=wdReplaceAll
.Text = "([.\!\?]) {3,}([A-Z])"
.Replacement.Text = "\1 \2"
.Execute Replace:=wdReplaceAll
'This should prevent most cases of improper double spacing 'Added
'in names (e.g., F. Lee Bailey, George W. Bush, etc.) 'Added
.Text = "([!A-Z][A-Z].) ([A-Z])"
'Added
.Replacement.Text = "\1 \2"
'Added
.Execute Replace:=wdReplaceAll
'Added
End With
End Sub

There still could be nuances that this code doesn't correct or "over
corrects" :-(

--
Greg Maxey/Word MVP
See:
http://gregmaxey.mvps.org/word_tips.htm
For some helpful tips using Word.


Joe said:
Greg--I found one miniscule problem running this macro. It does a
great job of making sure there are two spaces after the end of a
sentence. However, it does the same thing any time a period (or
other punctuation) appears and is apparently followed by at least 1
space. Thus somebody's middle initial would end up with two spaces.
Hardly the end of the world. It does not do the same for periods in
the middle of a word, as in microsoft.com or a company name, such as
Dewey Cheatham & Howe P.C. .
 

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