How to Fix Mail Merge Barcode Images Showing Only First Row in Word
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.

- 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.
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.
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.
Press Alt + F9 on your keyboard to reveal all field codes in your Word document.
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).
Press Alt + F9 again to hide the raw field codes and return to the normal document view.
Click 'Preview Results' or finish the merge to generate the final document. The barcodes will now dynamically update for every row.

Update the INCLUDEPICTURE Field Codes
If you must use image URLs generated from Excel, ensure the INCLUDEPICTURE field is correctly structured and updated.
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. Open WPS Writer: Launch WPS Office and open your main document template.
- 2. Navigate to Mail Merge: Go to the 'References' tab and click on the 'Mail Merge' button to reveal the mailing ribbon.
- 3. Connect Data Source: Select 'Open Data Source' to link your Excel spreadsheet containing your unique data or SKUs.
- 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.

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.




