WD: Error Message in Place of BARCODE Field

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

SYMPTOMS

The following error messages may appear in place of the POSTNET (POSTal Numeric Encoding Technique) barcode when using the BARCODE field:

  • ZIP Code not valid!

        -or-
    
  • No ZIP Code!

CAUSE

The BARCODE field generates this result under the following cases.

Case 1

The BARCODE field in the mailing labels or envelopes mail merge main document refers to the wrong field.

Case 2

The ZIP Code portion of the mailing address contains invalid characters, such as non-breaking hyphens, symbols, extra spaces, or other special characters.

Case 3

The layout of the BARCODE field is incorrect.

RESOLUTION

Case 1

If the Barcode field refers to the wrong field for the ZIP Code information, edit the BARCODE field and change the MERGEFIELD reference to the correct field name. Follow these steps to edit the BARCODE field:

  1. Select the "ZIP Code not valid" error.

  2. Display the field codes by pressing SHIFT+F9 (or click Options on the Tools menu, click the View tab, select Field Codes, and then click OK). The following field codes appear:

           {BARCODE { MERGEFIELD address1} <P>
           {MERGEFIELD zipcodefield} \u}
    

    where "address1" is the field containing the street address or postal box information, "<P>" represents a paragraph mark, and "zipcodefield" is the field containing the ZIP Code information.

  3. Ensure that "zipcodefield" is the name of the field that contains the ZIP Code information. If not, select it and replace it with the correct field name.

  4. Toggle the field codes off by pressing SHIFT+F9 (or click Options on the Tools menus, click the View tab, clear the Field Codes option box, then click OK).

CASE 2

If the data document contains invalid characters in the ZIP Code field, remove the invalid characters and replace them, if necessary, with valid characters. The only valid characters allowed in the ZIP Code field are numeric digits (arabic numerals) and a hyphen (dash) as the separator for the Zip+4.

Case 3

The BARCODE field must span two lines (it must contain a paragraph mark), and must include quotation marks in the right places. If it does not meet these requirements, Word changes the last two digits of the barcode to 99.

Incorrect BARCODE field:

   {BARCODE "{ MERGEFIELD address1 } {MERGEFIELD zipcodefield }" \u }

Correct BARCODE field

   {BARCODE "{ MERGEFIELD address1 } <P>
   {MERGEFIELD zipcodefield }" \u }

where "<P>" represents a paragraph mark.

If the BARCODE field is not formatted correctly, press ENTER to move the second half of the field onto the second line, and type the quotation marks.

MORE INFORMATION

ZIP Code information referenced by the BARCODE field must be formatted as five numbers followed by a hyphen, followed by four numbers. The "ZIP Code not valid!" error occurs if the data does not match the above mentioned format or invalid characters are used. The only valid characters are arabic numerals and the hyphen character.

NOTE: Since the BARCODE field reads the data from left to right, a space after the last digit of the ZIP Code does not generate this error.

To view paragraph marks and other non-printing characters, click the Show/Hide button on the Standard Toolbar.

For additional information on adding or creating a postal barcode in Microsoft Word or if the barcode produces the incorrect results, please see the following articles in the Microsoft Knowledge Base:

   ARTICLE-ID: Q112252
   TITLE     : Word Assigns a Delivery Point Bar Code (DPBC) of 99

   ARTICLE-ID: Q106012
   TITLE     : How to Add a Postal Bar Code to Labels or Documents

   ARTICLE-ID: Q126863
   TITLE     : Delivery Point Bar Code Uses 99 in Last Two Digits of
               Address

   ARTICLE-ID: Q105576
   TITLE     : Position of Bar Codes is Certified by U.S. Postal Service


Additional query words: barcode code mail merge valid zip 8.0 8.00
macword98
Keywords : kbfield macword winword word6 word7 word8 word95 word97 kberrmsg kbfaq
Version : WINDOWS:6.0,6.0a,6.0c,7.0,7.0a,97; MACINTOSH:6.0,6.0.1,98
Platform : MACINTOSH WINDOWS
Issue type : kbprb
Solution Type : 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 27, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.