Please Note: This article is written for users of the following Microsoft Word versions: 2007, 2010, 2013, 2016, 2019, Word in Microsoft 365, and 2021. 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: Formatted Merging.

Formatted Merging

Written by Allen Wyatt (last updated August 10, 2024)
This tip applies to Word 2007, 2010, 2013, 2016, 2019, Word in Microsoft 365, and 2021


When you use Word's merge tool, the information merged into a main document assumes the formatting applied in that main document. The formatting of information in the data source has no effect. Most of the time this is a desirable thing; the information in the data source could have some bizarre formatting that you don't want applied in your main document.

There are times, however, when this may not be desirable. For instance, say one of the merge fields is a company name, and you want some of the companies to be shown in bold in your main document, and other companies to be shown in regular text. Even if you make some of the companies bold in the data source, Word ignores the formatting when it does the merge with your main document.

Unfortunately, Word doesn't provide a magic switch that you can use with the company merge field to force the formatting in the data source to be used. This can be worked around with a little ingenuity and the use of Word's conditional IF field. Follow these steps to achieve the desired results:

  1. In your data source file, add another field called "FormatBold." You can actually name it anything you like; the purpose of the field is to indicate which companies should be formatted as bold when merged into the main document.
  2. For each company's record where you want the company name in bold, enter a "Y" or "yes" (be consistent) in the FormatBold field.
  3. Open the main document.
  4. At the point where you want the company name to appear in the document, insert a pair of field braces by pressing Ctrl+F9.
  5. Type IF followed by a space.
  6. Insert the new merge field you added to the data source (FormatBold).
  7. Type a space, followed by the equal sign (=) followed by "yes" or "Y" (in quotes), followed by another space. (Make sure you use the same "yes" or "Y" convention you used in step 2.)
  8. Turn on bold formatting (press Ctrl+B).
  9. Insert the company merge field followed by a space.
  10. Turn off bold formatting (again press Ctrl+B), and insert the company merge field again.

At this point, the entire compound merge field should look like the following. (If you can't see all the merge fields for some reason, select the text and press Alt+F9.)

{ IF { MERGEFIELD FormatBold } = "yes" { MERGEFIELD Company } { MERGEFIELD Company } }

Of course, the first occurrence of { MERGEFIELD Company } will be bold, and the second will not. What this field does is to check the contents of the FormatBold merge field. If it is set to "yes" then Word inserts the first Company MERGEFIELD (the bold one), otherwise the second (nonbold one) is inserted. Either way, some of your merge documents will have the company name bold, and others will not.

WordTips is your source for cost-effective Microsoft Word training. (Microsoft Word is the most popular word processing software in the world.) This tip (11278) applies to Microsoft Word 2007, 2010, 2013, 2016, 2019, Word in Microsoft 365, and 2021. You can find a version of this tip for the older menu interface of Word here: Formatted Merging.

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

Using Overtype Mode

Have you ever typed something in Excel, only to have it replace whatever is to the right of the insertion point? That's ...

Discover More

Selecting Visible Cells in a Macro

Many times you need to select just the visible cells before taking some action. It is helpful to know how to make this ...

Discover More

Changing Text Case

Word provides a built-in shortcut to change the case of a text selection. Understanding how that shortcut works (and the ...

Discover More

Learning Made Easy! Quickly teach yourself how to format, publish, and share your content using Word 2013. With Step by Step, you set the pace, building and practicing the skills you need, just when you need them! Check out Microsoft Word 2013 Step by Step 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

Merging and Printing a Series of Documents

Do you need to merge and print a number of documents in a particular order? Perhaps the best approach is to record a ...

Discover More

Conditional Processing During a Mail Merge

The Mail Merge capabilities built into Word can appear limited at first glance. One thing that is often overlooked (and ...

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 nine minus 1?

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 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.