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 August 23, 2018)
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.
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!
The Mail Merge capabilities built into Word can appear limited at first glance. One thing that is often overlooked (and ...Discover More
When you are doing a mail merge in Word, you may need to calculate a date sometime in the future. Word doesn't include an ...Discover More
When you create a group of documents from a merge file, Word normally inserts section breaks between iterations of the ...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.