Please Note: This article is written for users of the following Microsoft Word versions: 2007 and 2010. 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: Merging Formatted Data.
by Allen Wyatt
(last updated October 26, 2015)
Volker described a situation that he was having when merging data from an Access database. In the database he uses a mask for the phone number field, such as !(999) 000-0000;;_. When he merges the phone number into the Word document, the formatting symbols (the dashes and parentheses) are not in the merged data, so the phone numbers look strange.
If you have control over the Access database, perhaps the simplest solution is to change how the data is actually stored in your Access data table. When you define your phone number field in Access, specify that the mask characters be saved with the data in the phone number field. (Access allows you to either save the mask characters or not.) If you choose to store without them, you'll save space in your data table. If you choose to store with them, then they are available for export to programs such as Word.
If you have no control over the Access database, then making changes to how data is stored is probably not an option for you. In that case you may need to play with the merge fields used by Word. If the data is stored in the Access table as a number, then you can add a mask to the MERGEFIELD field within your Word merge document. Some good tips for how to do that can be found at either of the following locations:
Remember that using masks in this manner will only work if your phone number is stored in Access as a numeric value. Based on the fact that you are using a mask for the Access field, that tells me that your phone number is stored as text. (Masks are available only for date and text fields in Access, not for numeric fields.) The only recourse in that case is to actually modify how information is stored in the Access table.
WordTips is your source for cost-effective Microsoft Word training. (Microsoft Word is the most popular word processing software in the world.) This tip (10252) applies to Microsoft Word 2007 and 2010. You can find a version of this tip for the older menu interface of Word here: Merging Formatted Data.
Do More in Less Time! Are you ready to harness the full power of Word 2013 to create professional documents? In this comprehensive guide you'll learn the skills and techniques for efficiently building the documents you need for your professional and your personal life. Check out Word 2013 In Depth today!
When merging ZIP Codes from a data source such as Excel, you might find that Word ends up dropping out leading zeroes in the ...Discover More
When creating a mail-merge document, you may want to include some special characters, such as check-marked boxes, in the ...Discover More
The mail-merge feature in Word is a fast, easy way to create form letters addressed to many different people. Sometimes, ...Discover More
FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."
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.