Sign in with Microsoft
Sign in or create an account.
Hello,
Select a different account.
You have multiple accounts
Choose the account you want to sign in with.

This field code 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 and supported switches is also different. The use of field-argument-1 is the same as the data field in the MergeField field.

Syntax

{ MergeBarcode field-argument-1 field-argument-2 [ switches ] }

Field codes are not case sensitive.

  • Field-argument-1    Is the same as the data field in the MergeField field.

  • Field-argument-2    Is a string that specifies the type of barcode that will be generated. Barcode types are not case sensitive, so CODE39 is the same as Code39. The available types are UPCA, UPCE, JAN13, JAN8, EAN13, EAN8, CASE, ITF14, NW7, CODE39, CODE128, JPPOST, QR.

  • Switches    [optional] Field-specific switches. Some switches are barcode type specific.

  • \h [field-argument]    Field argument specifies the height of the barcode symbol. The units are in TWIPS (1/1440 inch).

  • \s [field-argument]    Field argument specifies a scaling factor for the symbol. The value is in whole percentage points and the valid values are from 10 to 1000.

  • \q [field-argument]    Field argument specifies the error correction level of QR Code. Valid values are 0 - 3.

  • \p [field-argument]    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]    Field argument specifies the style of a Case Code for barcode type ITF14. The valid values are [STD|EXT|ADD]

  • \r [field-argument]    Field argument specifies the rotation of the barcode symbol. Valid values are from 0 - 3.

  • \f [field-argument]    Field argument specifies the foreground color of the barcode symbol. Valid RGB values are in the range of 0 to 0xFFFFFF.

  • \b [field-argument]    Field argument specifies the background color of the barcode symbol. Valid RGB values are in the range of 0 to 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.

Instructions

Each barcode may use its own data format, and so check some of the links if you're not sure what's needed.

To use MergeBarcode in a document, follow these steps:

  1. Click or tap where you want the barcode.

  2. Press Ctrl + F9. You must do this, as just typing curly brackets {} won't work.

  3. Type MergeBarcode plus arguments and switches. For example MergeBarcode URL QR \q 3, which displays a QR code of the URL that's merged in.

    A QR code of www.microsoft.com

Examples

For examples see

3.1.3.2.8 MERGEBARCODE

Field codes: MergeField field

Field codes: DisplayBarcode

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.

Was this information helpful?

What affected your experience?
By pressing submit, your feedback will be used to improve Microsoft products and services. Your IT admin will be able to collect this data. Privacy Statement.

Thank you for your feedback!

×