Please Note: This article is written for users of the following Microsoft Word versions: 97, 2000, 2002, and 2003. If you are using a later version (Word 2007 or later), this tip may not work for you. For a version of this tip written specifically for later versions of Word, click here: Consistent Spacing.
Written by Allen Wyatt (last updated October 27, 2020)
This tip applies to Word 97, 2000, 2002, and 2003
Sub CheckSpaces() Call MakeChanges("Normal", ".") Call MakeChanges("Normal", "!") Call MakeChanges("Normal", ":") End Sub
Sub MakeChanges(StyName As String, PuncMark As String) Selection.HomeKey Unit:=wdStory Selection.Find.ClearFormatting Selection.Find.Style = ActiveDocument.Styles(StyName) Selection.Find.Replacement.ClearFormatting With Selection.Find .Text = PuncMark & " " .Replacement.Text = PuncMark & " " .Forward = True .Wrap = wdFindContinue .Format = True End With Selection.Find.Execute Replace:=wdReplaceAll Selection.Find.Text = PuncMark & " " Selection.Find.Execute Replace:=wdReplaceAll End SubCheckSpaces will only take extra spaces out of paragraphs formatted with the Normal style. This ensures you won't mess up formatting in tables or other design elements where you may want extra spaces after periods. If you want to change the type of punctuation searched for, or search in different style paragraphs, add additional calls to MakeChanges after the fourth line in the macro.
Note:
WordTips is your source for cost-effective Microsoft Word training. (Microsoft Word is the most popular word processing software in the world.) This tip (262) applies to Microsoft Word 97, 2000, 2002, and 2003. You can find a version of this tip for the ribbon interface of Word (Word 2007 and later) here: Consistent Spacing.
Create Custom Apps with VBA! Discover how to extend the capabilities of Office 2013 (Word, Excel, PowerPoint, Outlook, and Access) with VBA programming, using it for writing macros, automating Office applications, and creating custom applications. Check out Mastering VBA for Office 2013 today!
Need to format a bunch of documents so they all look the same? If the documents use styles, doing the formatting is ...
Discover MoreThe AutoFormat feature of Word can be configured to make changes to a variety of conditions in your document. Here's how ...
Discover MoreWord can understand many different measurement units. One common unit understood by Word is the pica, described in this tip.
Discover MoreFREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."
2014-08-16 12:18:07
GeordieLad
Kiloyard. Thanks for your clear advice – and sucks to Gruntlelark who appears to be thoroughly DISgruntled!
Apart from the single or two spaces (and, incidentally, proportional spacing with a single space after a point does NOT improve the readability). Whatever, I find it no trouble at all to achieve my aim with a single Find/Replace per document.
What peeves me more is the absence of line spacing between paragraphs or listed items; hence my hitherto laborious procedure to make easier reading of text which may fill a page without paragraph separators. No paragraph should be longer than, say, a dozen lines; if it is, the reader’s eyes tend to glaze over and the message is lost. In some instances it is not easy to see the end of a paragraph; often I need to highlight selected text and change font size to find the “hard” return (a CR without the LF). It’s the latter which peeves me most when, with a little more consideration, the writer could have got his message over much more clearly.
Nuff said?
2014-08-15 09:10:23
Gruntledlark
Anyone who uses 2 spaces after a period is a stubborn old coot. I'm over 50 and I learned to add 2 spaces in HS typing class - where I learned ON A TYPEWRITER. I doubt that anyone posting here is using a typewriter. Nearly every font in common use these days is proportional so DON'T ADD THE EXTRA SPACE! This is one of my pet peeves. Whenever I get a document that was started by someone else and I'm asked to complete it, my first step is to run a FIND/REPLACE for ". " to ". "
Also, WTH are you adding "CRLFs" to get spacing b/w your paragraphs? That's what style definitions are for.
Create documents with the tools you have today. Don't try to force old rules and tools from old technology into your documents - you just end up pissing off the next person who has to handle it.
2014-07-07 15:25:45
Kiloyard
GeordieLad, if I understand correctly what you are trying to achieve with a “hard” CRLF, you seem to be using line spacing to achieve paragraph spacing. There is an overly complex find-and-replace solution that would result in the same visual effect, but the simple solution would appear to be to select the necessary paragraphs and (assuming a 12 point font) Format>Paragraph>After=6 pt (Alt+O, P, Alt+F, 6, Enter)
If you don’t want to go through that procedure each time (and why would you?) you can just modify your ‘Normal’ Style by selecting and right-clicking on some of the modified text and selecting Style>Update Normal to Match Selection
2014-07-07 04:12:00
PeterJ
This is an old chestnut and one that people often argue about. The point is that whatever you choose needs to be consistent. I do have a macro that enforces two spaces. However, the easiest way of being consistent is to let Word itself check this for you. There are two settings that you need to make in Word Options.
First go to Word Options and Proofing. This is where the real work is done – in the 'When correcting spelling and grammar in Word' section.
1. Make sure that 'Mark grammar errors as you type' is ticked.
2. Choose - Grammar & Style
- Writing Style: Click the 'Settings' button
- Word has a setting 'Spaces Required between sentences'
- There are three choices 1, 2, and don't check (the default)
- You need to set this twice once for Grammar & Style and once for Grammar only.
Then the end of every sentence that goes against your chosen standard will be highlighted as a grammatical error by a wavy green underline. Right click on those and correct them.
2014-07-06 07:30:47
GeordieLad
I agree wholeheartedly with Bruno V; two spaces after the end of a sentence makes the text much easier to read. I habitually use Find and replace to achieve this (and for sentences ending with ? or !).
Another point of preference for me is having a clear line space (or a half space) after every paragraph (by which I mean a "hard" CRLF in the text). Whilst this may use more paper (if printed) it certainly makes for easier reading. Unfortunately there is no Find and replace solution and it necessitates a laborious paragraph by paragraph action with a CRLF at the end of the penultimate text line in the paragraph followed by highlighting the remainder of the paragraph text and selecting Format>Paragraph>Line Spacing 1.5 lines. It may also necessaitate all relevant text being set to the Normal style. If one wants a half line space in this context even that is not achievable if there is a hyperlinked phrase bridging the last two lines; this then necessitates 2 CRLFs after the sentence point. If anyone knows how to solve that one I'd be pleased to see it.
2014-07-06 05:58:07
Bruno V
Allan, in reality there is no unwritten 'rule'. Instead opinions widely differ and studies about what is most readable (one or two spaces) are even to this day inconclusive.
My own tests, be it non-scientific (but then so are many others) lead me to use double spacing. Except for non-proportional typefaces such as used in this reply box and where double spacing actually interrupts the fluidity of reading. I could go deeper into the topic but this is not the place to do so.
Anyway, different people may have different preferences. The important thing is to be consistent within the same document or series of documents.
How could your tip be used for enforcing/checking double spacing?
2014-07-06 03:41:30
ShaulBel
If there are more than one extra space after the pank the macro should be changed because it replaces only the first extra space.
2014-07-05 10:49:46
Gillian
Hi,
How do you get to the macro tool "CheckSpaces" to make adjustments to the line spacing.
I cannot do what is required with know how to get to the CheckSpaces" link.
Thanks.
Gillian
Got a version of Word that uses the menu interface (Word 97, Word 2000, Word 2002, or Word 2003)? This site is for you! If you use a later version of Word, visit our WordTips site focusing on the ribbon interface.
Visit the WordTips channel on YouTube
FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."
Copyright © 2024 Sharon Parq Associates, Inc.
Comments