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: Merging Formatted Data.

Merging Formatted Data

Written by Allen Wyatt (last updated August 25, 2021)
This tip applies to Word 97, 2000, 2002, and 2003


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:

http://homepage.swissonline.ch/cindymeister/MM2002/MM2002.htm
http://www.gmayor.com/formatting_word_fields.htm

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 (143) 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: Merging Formatted Data.

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

Converting Phone Numbers

Sometimes you receive a phone number that contains alphabetic characters and you need to convert it to a purely numeric ...

Discover More

Combining First and Second Numbered Levels on One Paragraph

Want to customize your paragraph numbering in Word? There are a few tricks that can be used to automatically display the ...

Discover More

Canceling an Edit

When editing a cell, you may want to cancel the edit at some point. There are two ways to do this, both described in this ...

Discover More

Create Custom Apps with VBA! Discover how to extend the capabilities of Office 2013 (Word, Excel, PowerPoint, Outlook, and Access) with VBA programming, using it for writing macros, automating Office applications, and creating custom applications. Check out Mastering VBA for Office 2013 today!

More WordTips (menu)

Grouping Records in a Mail Merge

Need to group records in some manner when they are used in a mail merge? It can be frustrating when your records are not ...

Discover More

Data Source File in Word 2003

The security features introduced in Word 2003 resulted in a change in the dialog boxes you see when opening mail-merge ...

Discover More

Conditional Processing During a Mail Merge

The Mail Merge capabilities can appear limited at first glance. One thing that is often overlooked (and which makes 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 nine minus 5?

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

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.