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: Formatted Merging.
Written by Allen Wyatt (last updated September 9, 2023)
This tip applies to Word 97, 2000, 2002, and 2003
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:
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 (1321) 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: Formatted Merging.
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!
When settling on an overall design for your document, you need to decide how you want your headings to appear. If you ...
Discover MoreWant to have objects such as text boxes and shapes always appear using some formatting you like? Here are some ideas on ...
Discover MoreWhen you format bulleted lists or numbered lists, you may be surprised if some of the bullets or numbers don't match the ...
Discover MoreFREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."
There are currently no comments for this tip. (Be the first to leave your comment—just use the simple form above!)
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