3.1.3.2.7 DISPLAYBARCODE

NOTE: This section is not applicable to Word 2010.

Syntax:

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

field-argument-1:

field-argument

field-argument-2:

field-argument

Description: Renders a generated barcode symbol using the data in this display field.

field-argument-1 is a quoted string containing the data (barcode-data) used to generate the barcode symbol.

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

A 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 (case insensitive) are [L|M|Q|H].

\p field-argument

The text in this switch's field-argument specifies the style of a Point of Sale barcode (barcode types UPCA|UPCE|EAN13|EAN8).  The valid values (case insensitive) 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

 [Example: The following field encodes 490123456789 into an EAN-13 barcode symbol:

 DISPLAYBARCODE “490123456789” EAN13

end example]

[Example: The following field encodes “http://www.microsoft.com” into a QR Code symbol with highest error correction level:

 DISPLAYBARCODE “http://www.microsoft.com” QR \q h

end example]