Document Editing Problems

How to Fix Mail Merge Barcode Images Showing Only First Row in Word

Camila MilosovichCamila Milosovich Oct 20, 2026 870 views

Question details

Users experience an issue where barcode images inserted via external URLs during a mail merge fail to refresh, causing the barcode from the first record to duplicate across all subsequent rows.

How to Fix Mail Merge Barcode Images Showing Only the First Row
Product
Word
Device & OS
not provided
Scenario
Generating documents with dynamic barcode images using Excel URLs as the data source in a Word mail merge.
Observed behavior
Even after updating all fields, the mail merge document only displays the barcode image corresponding to the first record for every merged row.
Before you start

Ensure your Excel data source contains the correct URLs or SKUs for each row, and save a backup copy of your main mail merge document before modifying the field codes.

Solution 1Recommended

Use the Built-in MERGEBARCODE Field

The most reliable way to generate barcodes in a mail merge is by using Word's native MERGEBARCODE field instead of relying on external image URLs.

Linked images in mail merges often fail to refresh properly per record due to caching. Using the MERGEBARCODE field bypasses this issue by generating the barcode directly within the application.

1
Toggle Field Codes

Press Alt + F9 on your keyboard to reveal all field codes in your Word document.

2
Insert the MERGEBARCODE Field

Replace your existing image link field with the MERGEBARCODE field. Type it in this format: { MERGEBARCODE SKU QR } (assuming 'SKU' is your Excel column name and 'QR' is your desired barcode format).

3
Hide Field Codes

Press Alt + F9 again to hide the raw field codes and return to the normal document view.

4
Preview and Merge

Click 'Preview Results' or finish the merge to generate the final document. The barcodes will now dynamically update for every row.

Use the Built-in MERGEBARCODE Field
Barcode Syntax and Switches: The MERGEBARCODE field accepts various optional switches to define the barcode type (like QR, CODE128, etc.). Refer to Microsoft's official MERGEBARCODE field documentation for the complete syntax.
Efficient Mail Merge with WPS Office

Seamlessly Create Mail Merges and Labels with WPS Writer

WPS Office offers a robust and highly compatible Mail Merge feature, allowing you to easily generate letters, labels, and documents with dynamic data from Excel spreadsheets.

  1. 1. Open WPS Writer: Launch WPS Office and open your main document template.
  2. 2. Navigate to Mail Merge: Go to the 'References' tab and click on the 'Mail Merge' button to reveal the mailing ribbon.
  3. 3. Connect Data Source: Select 'Open Data Source' to link your Excel spreadsheet containing your unique data or SKUs.
  4. 4. Insert Merge Fields: Click 'Insert Merge Field' to place your data into the document, then click 'Merge to New Document' to complete the process.
Highly compatible with Microsoft Office field codes and mail merge documents.Easily insert dynamic data fields from Excel files to generate personalized documents.Free and lightweight alternative for seamless document creation without performance lags.
microsoft office alternative - wps office

Frequently Asked Questions

Why are my mail merge images all identical?

When using linked images via the INCLUDEPICTURE field in a mail merge, the word processor often caches the first loaded image and fails to refresh it for subsequent records, causing the first image to repeat.

What is the MERGEBARCODE field?

MERGEBARCODE is a specific field code that dynamically generates a barcode or QR code for each record during a mail merge natively, avoiding the caching and updating issues associated with external image URLs.

How do I view field codes in my document?

You can easily toggle the display of field codes on and off by pressing the Alt + F9 keyboard shortcut in your document.

Can I use QR codes in a mail merge?

Yes. By using the MERGEBARCODE field with the 'QR' switch (for example, { MERGEBARCODE DataColumn QR }), you can successfully generate unique QR codes for each merged document.