|
|
The information in this website is provided without risk or
obligation and free of charge. However, if you have benefitted
from my efforts here and would like to make a contribution to
help me continue and maintain this work then any donation will
be greatly appreciated. Please click the adjacent button to
access PayPal. Thank you.
|
|
The purpose of
this Microsoft Word Help & Tips page is not to solve or even enter the debate on the proper spacing to
use after full stop puncuation. Some people prefer one space and others
prefer two. My purpose here is to provide a simple macro that users can
run after they have completed their document to automatically set two spaces
after each full stop puncuation mark (i.e., a period, and question mark, and an
exclamation mark). |
Sub TwoSpacesAfterSentence()
Dim oRng As Range
Set oRng = ActiveDocument.Range
With oRng.Find
.ClearFormatting
.MatchWildcards = True
.Text = "(*{2})([.\!\?]) ([A-Z])"
.Replacement.Text = "\1\2 \3"
'Two spaces between 2 and \
.Execute Replace:=wdReplaceAll
.Text = "([.\!\?]) {3,}([A-Z])"
.Replacement.Text = "\1 \2"
.Execute Replace:=wdReplaceAll
'This should prevent most
cases of improper double spacing
'in names (e.g., F. Lee Bailey, George W. Bush, etc.)
.Text = "([!A-Z][A-Z].) ([A-Z])"
'Two spaces between ) and (
.Replacement.Text = "\1 \2"
.Execute Replace:=wdReplaceAll
End With
End Sub
|
|
See:
Installing Macros for instructions on how to set up and use the macro
listed above.
See:
Setup Menu/Toolbar for instructions on how to run a macro from a menu or
toolbar icon.
See:
Keyboard Shortcut for instructions on how to run a macro from a menu or
toolbar icon. |
|
|
Looking for something else?
|
|
|
|
|
|