3.1.3.2.8 MERGEBARCODE

NOTE: This section is not applicable to Word 2010.

Syntax:

MERGEBARCODE field-argument-1 field-argument-2 [ switches ]

field-argument-1:

field-argument

field-argument-2:

field-argument

Description:

This field is analogous to the field code, MERGEFIELD. The main difference is that MERGEBARCODE generates a DISPLAYBARCODE field based on the merge result instead of showing it directly. The syntax of field instruction and supported switches is also different.

The use of field-argument-1 is the same as the data field in the MERGEFIELD field.

field-argument-2 is a text string containing the type of barcode (barcode-type) that will be generated.  The valid values (case-insensitive) are:  UPCA|UPCE|JAN13|JAN8|EAN13|EAN8|CASE|ITF14|NW7|CODE39|CODE128|JPPOST|QR

The meanings of these values are described in the following table:

Field-argument-2

Barcode Type Description

QR

A QR 2D bar code as specified by [ISO/IEC18004:2006].

CODE128

A Code 128 linear bar code as specified by [AIM-BC4-1995-Code128].

CODE39

A Code 39 linear bar code as specified by [AIM-BC1-1995-Code39].

JPPOST

Japanese Postal Service Customer barcode. JPPost is compliant with CBC (Customer Bar Code), which is also known as RM4SCC.

EAN8|EAN13

An EAN - International Article Number worldwide bar code for product ID’s (8 digit/13 digit) as specified in [GS1-BARCODE].

JAN8|JAN13

A JAN: Japanese barcode for product ID’s (8 digit/13 digit). JAN8 is an alias of EAN8. JAN13 is an alias of EAN13.

UPCA|UPCE

A UPC (A&E): US barcode for product ID’s as specified in [GS1-BARCODE].

ITF14

An ITF-14 item-tracking barcode for shipping as specified in [GS1-BARCODE].

NW7

A NW-7 (CODABAR) serial number bar code as specified by [AIM-BC3-1995-Codabar].

CASE

USPS barcode – FIM/POSTNET (*2) - barcode for tracking USPS mail. CASE is an alias of ITF14.

Switches: Zero or more of the following field-specific-switches.

Field Switch

Description

\h field-argument

The text in this switch's field-argument is an integer that specifies the height of the symbol.  The units are in TWIPS (1/1440 inch).

\s field-argument

The text in this switch's field-argument is an integer that specifies a scaling factor for the symbol. The value is in whole percentage points and the valid values are [10, 1000]

\q field-argument

The text in this switch's field-argument is an integer that specifies the error correction level of QR Code.  Valid values are [L|M|Q|H].

\p field-argument

The text in this switch's field-argument specifies the style of a POS barcode (barcode types UPCA|UPCE|EAN13|EAN8).  The valid values are [STD|SUP2|SUP5|CASE].

\x

Fixes the check digit if it’s invalid.

\d

Adds Start/Stop characters for barcode types NW7 and CODE39

\c field-argument

The text in this switch's field-argument specifies the style of a Case Code for barcode type ITF14.   The valid values are [STD|EXT|ADD]

\r field-argument

The text in this switch's field-argument is an integer that specifies the rotation of the barcode symbol.  Valid values are [0, 3]

\f field-argument

The text in this switch's field-argument is an integer that specifies the foreground color of the barcode symbol.  Valid values are in the range [0, 0xFFFFFF]

\b field-argument

The text in this switch's field-argument is an integer that specifies the background color of the barcode symbol.  Valid values are in the range [0, 0xFFFFFF]

\t

Display barcode data (text) along with image

\a

Concatenate all mapped address fields to generate a Japanese Postal Customer Barcode. The field-argument and Barcode-Type arguments and all other switches are ignored when this switch is used.

 [Example: The following field uses the data in BarcodeData to generate an EAN-13 barcode with default style:

 MERGEBARCODE BarcodeData EAN13

end example]

[Example: The following field uses the data in URL to generate a QR Code with highest error correction level:

 MERGEBARCODE URL QR \q h

end example]

[Example: The following field concatenates all mapped address fields and uses that data to generate a Japanese Postal Customer Barcode:

 MERGEBARCODE PLACEHOLDER JPPOST \a

end example]