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: Adding Serial Commas in a Sentence.

Adding Serial Commas in a Sentence

Written by Allen Wyatt (last updated December 25, 2021)
This tip applies to Word 97, 2000, 2002, and 2003


One of the most common issues faced by Emily when editing involves the insertion of the serial comma in an in-line list of items, before the final conjunction between list items. Emily's office enforces the use of the serial comma for clarity and to avoid such potentially awkward phrasings as, "I dedicate this book to my parents, Mother Teresa and Jesus." However, most writers do not like to use this comma, so Emily spends a good amount of time editing it into almost every paragraph of text she comes across. Emily notes that it would make her life easier if she had a macro that would search from the insertion point to the end of the current sentence and insert a comma before the next occurrence of the common conjunctions "and" and "or", but only if there is no comma already there.

The best way to handle this situation is with a macro, as Emily notes. Here is one that will perform the task:

Sub SerialComma()
    Dim MySelection As Selection

    Selection.MoveRight Unit:=wdSentence, Extend:=wdExtend
    Set MySelection = Selection
    Selection.Find.ClearFormatting
    Selection.Find.Replacement.ClearFormatting
    With Selection.Find
        .Text = "([!,.?;:]) and "
        .Replacement.Text = "\1, and "
        .Forward = True
        .Wrap = wdFindStop
        .Format = False
        .MatchCase = False
        .MatchWildcards = True
    End With
    Selection.Find.Execute Replace:=wdReplaceAll
    MySelection.Select
    With Selection.Find
        .Text = "([!,.?;:]) or "
        .Replacement.Text = "\1, or "
    End With
    Selection.Find.Execute Replace:=wdReplaceAll
    MySelection.Select
    Selection.Collapse
End Sub

The macro first selects everything from the current insertion point to the end of the current sentence. Then, using a wild card search, it searches for an occurrence of the word "and" that doesn't follow a punctuation mark. If it finds it, it replace the occurrence with a comma and the word "and". It will then do a similar search-and-replace operation for the word "or".

This macro can, of course, be assigned to a shortcut key or a toolbar button to make adding this type of comma a snap.

Another configuration change you might want to do is to tell Word that you want to have it mark as incorrect any missing commas in your inline lists. You can make this change in this manner:

  1. Choose Options from the Tools menu. Word displays the Options dialog box.
  2. Make sure the Spelling & Grammar tab is selected. (See Figure 1.)
  3. Figure 1. The Spelling & Grammar tab of the Options dialog box.

  4. Click on the Settings button. Word displays the Grammar Settings dialog box. (See Figure 2.)
  5. Figure 2. The Grammar Settings dialog box.

  6. Make sure the "Comma Required before Last List Item" option is set to Always.
  7. Click on OK to close the Grammar Settings dialog box.
  8. Click on OK to close the Options dialog box.

The setting won't insert the last comma for you, but it will catch those instances where the comma is not present.

Note:

If you would like to know how to use the macros described on this page (or on any other page on the WordTips sites), I've prepared a special page that includes helpful information. Click here to open that special page in a new browser tab.

WordTips is your source for cost-effective Microsoft Word training. (Microsoft Word is the most popular word processing software in the world.) This tip (9293) 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: Adding Serial Commas in a Sentence.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Chopped Off Page Borders

Tired of your page borders not printing out as you expect? The problem could be due to any number of settings or ...

Discover More

Incomplete and Corrupt Sorting

Using the sorting tools, on the toolbar, may result in some unwanted results, such as jumbled data. If this happens to ...

Discover More

Resetting Default Names for New Worksheets

When you add a new worksheet to a workbook, Excel gives it a default name that consists of "Sheet" followed by a number. ...

Discover More

Comprehensive VBA Guide Visual Basic for Applications (VBA) is the language used for writing macros in all Office programs. This complete guide shows both professionals and novices how to master VBA in order to customize the entire Office suite for their needs. Check out Mastering VBA for Office 2010 today!

More WordTips (menu)

Capitalizing the First Letter after a Colon

There are many rules in English grammar (and many exceptions to those rules.) One common rule of grammar is to capitalize ...

Discover More

Putting Character Codes to Work

If you know the character codes for some characters of interest, you can use those codes to do lots of tasks. This tip ...

Discover More

Deleting Freezes Computer

Sometimes a strange object or text may appear in your document, as happened to Sharon. To complicate the situation, her ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] (all 7 characters, in the sequence shown) in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is 6 + 5?

There are currently no comments for this tip. (Be the first to leave your comment—just use the simple form above!)


This Site

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.

Videos
Subscribe

FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.