Fix Word DisplayBarcode Changing Characters in Mail Merge
Question details
The user needs to fix an issue where the DisplayBarcode merge field modifies specific characters during a mail merge for invoice records.

- Product
- Microsoft Word
- Device & OS
- not provided
- Scenario
- Generating barcodes or QR codes for invoice records using the DisplayBarcode field combined with Mail Merge.
- Observed behavior
- Certain characters in the source data are altered in the final generated barcode. The result varies depending on text length and happens with both manually entered raw text and data imported from Dynamics.
Before proceeding, test your generated barcodes with at least two different barcode or QR code reader apps to verify if the character changes are caused by a specific reader's encoding interpretation.
Isolate the Issue and Report to the Product Team
Since this is related to a known encoding behavior with Word's DisplayBarcode field, testing in a controlled document and submitting a detailed report is the recommended approach.
Microsoft has indicated that this issue may be related to previous work involving the encoding of newline characters in QR codes. The exact manifestation of the problem often depends on both the length of the text and the specific barcode reader being used.
Open a new, blank Word document and set up a basic Mail Merge using a small subset of your affected invoice records or raw text.
Add the exact DisplayBarcode merge field you are having trouble with, ensuring you specify the correct barcode type.
Scan the resulting barcodes with multiple QR code or barcode reader applications to determine if the newline characters and specific symbols render consistently.
Navigate to the 'Help' tab in Word, select 'Feedback', and report the issue. Be sure to include your source text, the exact merge field, the generated barcode type, and details about the affected records.

Try WPS Office for Reliable Document Creation
If formatting glitches and barcode encoding issues in Microsoft Word are slowing down your invoice generation, consider switching to WPS Office. It provides a lightweight, highly compatible, and free alternative for managing complex document formatting, mail merges, and daily office tasks.
- 1. Download and Install: Visit the official WPS Office website to download the free suite and install it on your computer.
- 2. Open Your Templates: Launch WPS Writer and open your existing .docx mail merge templates without worrying about formatting loss.
- 3. Resume Your Workflow: Connect your data sources effortlessly and continue your invoice generation process in a stable environment.

Frequently Asked Questions
Why do line breaks appear differently in my generated QR codes?
Different QR code reader applications handle newline characters and encoding variations in their own ways. It is highly recommended to scan your generated barcode with multiple reader apps to determine if the formatting issue is reader-specific.
Can text length affect how the DisplayBarcode field renders in Word?
Yes, users have observed that the alteration of characters or encoding behavior can vary depending on the length of the text being processed by the DisplayBarcode merge field.
Does this character altering issue only happen with data imported from Dynamics?
No, the issue with the DisplayBarcode field can occur both with data imported from external sources like Dynamics and with raw text that is entered manually into the document.




