Please Note: This article is written for users of the following Microsoft Word versions: 2007, 2010, 2013, and 2016. If you are using an earlier version (Word 2003 or earlier), this tip may not work for you. For a version of this tip written specifically for earlier versions of Word, click here: Conditionally Adding a Period in a Mail Merge.

Conditionally Adding a Period in a Mail Merge

Written by Allen Wyatt (last updated October 6, 2021)
This tip applies to Word 2007, 2010, 2013, and 2016


1

Rose uses Word's mail-merge feature to create certificates. The source data is in an Access database, and sometimes the middle initial pulled from the database has a period after the initial and sometimes it doesn't. Rose is wondering if there is a way, in Word, to have the mail merge check for the trailing period on the data in the middle initial field and automatically add one if necessary.

Unfortunately, we couldn't come up with a way to do this. Word doesn't seem to have the capability to check for characters within the merged data on the fly. We did come up with a workaround, however. Open your merge document and, right after the merge field that inserts the middle initial, type a period. When you do your merge, some middle initials will have one period (if they had none in the data source) and others will have two (if they had one in the data source). All you then need to do is a Find and Replace operation, replacing all instances of two periods with a single period.

This may not be as "clean" as you desire; after all, it adds an extra step to your certificate preparation. It is easier, however, than manually going through the merged file and looking at each middle initial yourself.

WordTips is your source for cost-effective Microsoft Word training. (Microsoft Word is the most popular word processing software in the world.) This tip (9629) applies to Microsoft Word 2007, 2010, 2013, and 2016. You can find a version of this tip for the older menu interface of Word here: Conditionally Adding a Period in a Mail Merge.

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

Anchoring Objects by Default

When you position objects (such as text boxes or graphics) on a page, one of the things you can do is to anchor the ...

Discover More

Quickly Changing Columns

You can use the Columns tool, available on the Page Layout or Layout tab (depending on which version of Word you are ...

Discover More

Weird Hyperlink Behavior

When you insert a hyperlink, you expect it to look like, well, a hyperlink. But what if it really looks like some strange ...

Discover More

The First and Last Word on Word! Bestselling For Dummies author Dan Gookin puts his usual fun and friendly candor back to work to show you how to navigate Word 2013. Spend more time working and less time trying to figure it all out! Check out Word 2013 For Dummies today!

More WordTips (ribbon)

Using Merge Fields

When creating a mail merge document, you use merge fields to indicate where the information from each record of your data ...

Discover More

Getting Rid of Spaces in Merged Data

When you merge information with a Word document, you may not be completely satisfied with the appearance of some of the ...

Discover More

Checkboxes in a Merged Document

When creating a mail-merge document, you may want to include some special characters, such as check-marked boxes, in the ...

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 5 - 3?

2017-09-18 23:06:12

Kim

I was able to set this up to add the period using nested IF statements (also setup to recognise if there is no middle initial supplied). It also assumes that the middle initial is in a separate field:

{ MERGEFIELD First_name } { IF "{MERGEFIELD Middle_initial }" <> "" "{ IF "{MERGEFIELD Middle_initial }" = "*." "{MERGEFIELD Middle_initial } " "{MERGEFIELD Middle_initial }. " } }{MERGEFIELD Suname }

The first and last MERGEFIELDS are to insert the First and Surnames

The nested IF first looks to identify if the Middle_Initial field is blank: <> ""
if the condition is false do nothing
If the condition is true, then it looks to identify if the Middle_Initial field ends with a period: = "*."
If the condition is true then add the Middle_Initial field with a space after it (so there is a space between middle and surname)
If the condition is false then add the Middle_Initial field with a period and space after it (so there is a space between middle and surname)


This Site

Got a version of Word that uses the ribbon interface (Word 2007 or later)? This site is for you! If you use an earlier version of Word, visit our WordTips site focusing on the menu 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.