How to Create a QR Code Mail Merge in Word and Excel on Mac
Question details
The user needs to create a mail merge document that generates unique QR codes from an Excel data source on a Mac.

- Product
- Word and Excel
- Device & OS
- Mac
- Scenario
- Merging data from an Excel spreadsheet into a Word document on macOS to dynamically display unique QR codes for each record.
- Observed behavior
- Built-in fields like BARCODE and MERGEBARCODE fail or are unsupported in Word for Mac, requiring an alternative method to display the QR codes during the mail merge.
Ensure all your QR codes are pre-generated, saved as individual image files in a specific folder on your Mac, and that you have their exact file paths listed in a column within your Excel data source.
Use the INCLUDEPICTURE Field with Image File Paths
Bypass the barcode field limitations on Mac by storing QR codes as images and linking them into the Word document via their file paths.
Since the native BARCODE and MERGEBARCODE fields are unreliable or unsupported in Word for Mac and Word Online, the most effective workaround is to handle the QR codes as standard images. By using the INCLUDEPICTURE field, Word can fetch and display the correct image for each merged record.
Open your Excel spreadsheet and add a new column (e.g., 'QRCodePath'). Fill this column with the complete file paths to each corresponding QR code image saved on your Mac.
Open your Word mail merge document. Press Command + F9 to insert empty field braces { }. Inside the braces, type: INCLUDEPICTURE "{ MERGEFIELD QRCodePath }" (replace 'QRCodePath' with your actual column name).
Proceed with your mail merge as usual by going to the Mailings tab and clicking 'Finish & Merge' to generate the final document.
In the newly merged document, select all text by pressing Command + A, then press F9 (or Fn + F9 on some Mac keyboards) to update the fields. The correct QR code images will now appear in place of the field codes.

Switch to Word for Windows for Native Barcode Support
If you frequently need to generate QR codes from data strings without manually managing image files, utilizing the Windows version of Word is recommended.
Perform Mail Merge Seamlessly with WPS Office
WPS Office provides a highly capable Mail Merge feature that is fully compatible with Word and Excel files. You can effortlessly connect data sources, insert fields, and manage bulk document creation in an intuitive environment.
- 1. Open WPS Writer: Launch WPS Office on your computer and open the main document template where you want to perform the mail merge.
- 2. Access Mail Merge Tools: Navigate to the 'References' tab on the top ribbon and click on the 'Mail Merge' button to activate the mail merge toolbar.
- 3. Connect Excel Data Source: Click on 'Open Data Source' and select the Excel spreadsheet containing your contact data or image paths.
- 4. Insert Merge Fields: Place your cursor in the document where you need the data, click 'Insert Merge Field', and choose the appropriate columns from your data source.
- 5. Complete the Merge: Click 'Merge to New Document' to automatically generate a batch of customized documents containing all your merged data.

Frequently Asked Questions
Why doesn't the MERGEBARCODE field work for QR codes in Word for Mac?
Word for Mac has limited support for certain advanced field codes compared to its Windows counterpart. The BARCODE and MERGEBARCODE fields are frequently unsupported or unreliable on macOS, which is why utilizing image paths via the INCLUDEPICTURE field is the recommended workaround.
How do I view the field codes instead of the merged results on my Mac?
You can easily toggle between viewing the underlying field codes (like { INCLUDEPICTURE }) and their actual merged results by pressing Option + F9 on your Mac keyboard.
Can I place the QR code image inside a table cell during a mail merge?
Yes, the INCLUDEPICTURE field functions perfectly inside table cells. Just ensure that your table cell dimensions are configured correctly so the inserted QR code image fits without distorting your document layout.
What should I do if my INCLUDEPICTURE fields show broken links after the merge?
First, double-check that the file paths in your Excel data source are accurate and point to the correct locations on your Mac. After finishing the mail merge, remember to select the entire document (Command + A) and press F9 to force Word to update the fields and fetch the images.




