QR codes in a Word mail merge
2 December 2026
Word's mail merge makes a letter, certificate or label for every row of a spreadsheet. Names and addresses are easy. A different picture on every page, such as each person's QR code, takes one extra field, and this post walks through it.
Every BulkQR download of PNG or SVG images includes the spreadsheet to merge
from: _merge.csv, with one row per code, your other columns, and an @image
column naming each code's file. Mail merge QR codes
explains what's in it. These steps are for Word on Windows.
Just the link?
If the code only needs to appear as text, such as a link in a letter, you don't need a picture at all. Insert the data field like any other, and skip step 3.
1. Add a column with each picture's full path
InDesign finds pictures next to the CSV, but Word wants the full path to every image. Microsoft's page on picture fields also says to write each backslash in a path twice, because Word reads a single backslash as the start of a switch.
Generate your codes at BulkQR as PNG, and unzip the download, say to
C:\Users\you\Downloads\qrcodes.Open
_merge.csvin Excel.Add a column headed
Picture, a plain name with no@, which Word's field names don't like.Fill it with a formula that puts the folder in front of the file name. In the gala list
@imageis column H; change bothHs to match yours:=IF(H2="", "", "C:\\Users\\you\\Downloads\\qrcodes\\"&H2)Fill it down to the last row. Rows whose code failed stay empty.
Save it as an Excel Workbook (
.xlsx), saymerge.xlsx, in the same folder.
2. Set up the merge
- In Word, choose Mailings › Start Mail Merge, then Letters for a page per person, or Labels for a sheet of labels (pick your label product).
- Choose Select Recipients › Use an Existing List… and open
merge.xlsx. - Lay out the page. Put text fields where they go with Insert Merge Field, such as the name and the table.
3. Insert the picture field
The picture needs a field inside a field: an INCLUDEPICTURE that reads its
file from your Picture column. Fields have to be made with Ctrl+F9;
braces typed from the keyboard won't work.
- Click where the code should go and press Ctrl+F9. A pair of grey braces appears.
- Inside them, type
INCLUDEPICTURE ""and put the cursor between the quotation marks. - Press Ctrl+F9 again and type
MERGEFIELD Pictureinside the new braces. - After the closing quotation mark, type
\d.
The field should now read:
{ INCLUDEPICTURE "{ MERGEFIELD Picture }" \d }
The \d switch links the picture rather than storing a copy in the document,
which keeps a long merge from growing huge. Press Alt+F9 to switch between
the field codes and what they show.
For labels, set up the first label, then choose Update Labels to copy it to the rest of the sheet.
Finish the merge
Choose Finish & Merge › Edit Individual Documents, then All. Word makes a new document with a page, or label, per row.
Then, in the new document, press Ctrl+A to select everything and F9 to update the fields. Until you do, Word can show the first code on every page. Picture fields only fetch their own image when they're updated, so this step matters.
Check a few pages, then scan a few codes from a printed proof with an ordinary phone. What makes a good QR code covers the size and contrast that keep them scanning.
When it doesn't work
- Every page shows the same code. The fields weren't updated: Ctrl+A, then F9, in the merged document.
- A picture is missing. Its path is wrong. Copy one value from the
Picturecolumn, change the doubled backslashes back to single ones, and paste it into File Explorer's address bar. If the file doesn't open, fix the folder in your formula. - A row has no code. Its
statusisfailed, because the code couldn't be made. Fix that row in your list and generate again, or filter it out under Edit Recipient List.
Making labels? There's a shorter way
If what you need is a sheet of printed labels with a code and a line or two of text on each, BulkQR's labels page makes the PDF directly, from the same list, without Word.
If the codes are the point of the document, such as badges or tickets with a designed layout, InDesign's Data Merge reads the merge file as it is and is far less fiddly.
More in this series
- Mail merge QR codes: what's in
_merge.csv - InDesign Data Merge with a unique QR code on every page
- Email each guest their own QR code
Got a list and a letter? Generate your codes and merge them in one go.