Welcome toWord.Tips.Net
Ask a Word Question
Make a Comment
Learn Access Now
Free Printable Forms
Beauty Tips
Car Tips
Cleaning Tips
College Tips
Cooking Tips
Excel2007 Tips
ExcelTips
Family Tips
Gardening Tips
Health Tips
Home Tips
Legal Tips
Money Tips
Organizing Tips
Pest Tips
Pet Tips
Wedding Tips
Word2007 Tips
WordTips
Collapsing and Expanding Subdocuments
There is an unwritten rule in typesetting that there should only be one space after the end of a sentence. This provides the best visual appearance on a printed page, particularly when using proportional typefaces. (If you are using monospace fonts, as you would on a typewriter, then you should use two spaces after the end of a sentence.) The problem is that it is easy to add additional spaces at the end of a sentence without even realizing it. The following WordBasic macro, CheckSpaces, is a tool you can use to double-check the end of your sentences.
Sub MAIN
MakeChanges("Body text", ".")
MakeChanges("Body text", "!")
MakeChanges("Body text", ":")
MakeChanges("Body text", Chr$(34))
End Sub
Sub MakeChanges(StyName$, PuncMark$)
FromWord$ = PuncMark$ + " "
ToWord$ = PuncMark$ + " "
StartOfDocument
EditFindStyle .Style = StyName$
EditReplace .Find = FromWord$, .Replace = ToWord$, \
.WholeWord = 0, .MatchCase = 0, .Format = 1, .ReplaceAll = 1
FromWord$ = PuncMark$ + " "
EditReplace .Find = FromWord$, .ReplaceAll = 1
End Sub
CheckSpaces will only take extra spaces out of paragraphs formatted with the Body text 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 fifth line in the macro.
Tip #261 applies to Microsoft Word versions: 6 95
Take Control! Master the real power behind Word! Successfully master the secrets of powerful formatting and create documents that stand out from the rest. Best of all, you can create documents that are easy to maintain and quick to change.