Microsoft KB Archive/193653

= Incorrect format of phone number in mail merge result =

Article ID: 193653

Article Last Modified on 3/15/2005

-

APPLIES TO


 * Microsoft Word 98 for Macintosh

-



This article was previously published under Q193653





SYMPTOMS
In Microsoft Word, when you perform a mail merge with an external data source that contains phone numbers, the phone numbers are incorrectly formatted in the mail merge results. The separator characters may be missing or incorrect, or you may receive the following error message:

Error! Picture String contains unmatched quotes.

For example, if the expected phone number is (999) 555-1212, the number may appear as one of the following:
 * 9995551212

-or-
 * (9995551212)

-or-
 * (999) 555 1212



CAUSE
This problem occurs when you use data from Microsoft Access or another database source that can store phone numbers as ordinary numbers, but can present them with the correct formatting in the native program.

During a mail merge, the data appears in its native, stored format from the external data source. This occurs when the merge field for the phone number is missing the numeric picture field switch or has incorrect syntax.



WORKAROUND
To work around this problem, use the numeric picture switch "\#" in the merge field for the phone number. Follow these rules when using the numeric picture switch "\#":
 * Enclose the format picture in quotation marks (") if the output format you want contains spaces, parentheses, or other characters.
 * Enclose any hyphens in apostrophes (') so that the hyphen is treated as a text string. This is necessary even if the entire format picture is already enclosed in quotation marks.

For example:   Format wanted     Field code to use ---  (999) 555-1212    {MERGEFIELD phone \# "(###) ###'-'####" } 999-555-1212     {MERGEFIELD phone \# "###'-'###'-'####" } 999 555-1212     {MERGEFIELD phone \# "### ###'-'####" }

NOTE: To view the actual field codes { } instead of the merge fields << >>, use OPTION+F9 to turn them on and off.



STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.



MORE INFORMATION
For additional information, please see the following articles in the Microsoft Knowledge Base:

142340 The Date, Phone Number, and Currency fields are merged incorrectly when you use an Access or Excel data source in Word 97 or in Word 2000

121938 Hyphens don't display correctly with numeric picture switch

Additional query words: ASCII ANSI dBase FoxPro macword6 Paradox SQL telephone text

Keywords: kbbug kbmerge kbfield kbpending KB193653

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.