WD: Incorrect Format of Phone Number in Mail Merge Result

Last reviewed: February 11, 1998
Article ID: Q172525
The information in this article applies to:
  • Microsoft Word for Windows, versions 6.0, 6.0a, 6.0c
  • Microsoft Word for Windows NT, version 6.0
  • Microsoft Word for the Macintosh, versions 6.0, 6.0.1, 6.0.1a
  • Microsoft Word for Windows 95, versions 7.0, 7.0a
  • Microsoft Word 97 for Windows
  • Microsoft Word 98 Macintosh Edition

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.

Examples:

   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 ALT+F9 (OPTION+F9 on Macintosh) to toggle them on and off.

STATUS

Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

MORE INFORMATION

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

   ARTICLE-ID: Q142340
   TITLE     : WD: Date, Currency Results Incorrect Merging from Access
               Database

   ARTICLE-ID: Q121938
   TITLE     : Hyphens Don't Display Correctly with Numeric Picture Switch


Additional query words: 8.0 8.00 ASCII ANSI dBase FoxPro macword6 Paradox
SQL telephone office office7 office95 office97 text
Keywords : kbfield kbmerge winword word6 word7 word8 word95 word97 kberrmsg kbfaq
Version : MACINTOSH:6.0,6.0.1,6.0.1a,98;WINDOWS:6.0,6.0a,6.0c,7.0,7.0a,97; WINDOWS NT:6.0
Platform : MACINTOSH NT WINDOWS
Issue type : kbbug
Solution Type : kbpending kbworkaround


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: February 11, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.