← Blog

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.

  1. Generate your codes at BulkQR as PNG, and unzip the download, say to C:\Users\you\Downloads\qrcodes.

  2. Open _merge.csv in Excel.

  3. Add a column headed Picture, a plain name with no @, which Word's field names don't like.

  4. Fill it with a formula that puts the folder in front of the file name. In the gala list @image is column H; change both Hs to match yours:

    =IF(H2="", "", "C:\\Users\\you\\Downloads\\qrcodes\\"&H2)
    

    Fill it down to the last row. Rows whose code failed stay empty.

  5. Save it as an Excel Workbook (.xlsx), say merge.xlsx, in the same folder.

2. Set up the merge

  1. 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).
  2. Choose Select Recipients › Use an Existing List… and open merge.xlsx.
  3. 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.

  1. Click where the code should go and press Ctrl+F9. A pair of grey braces appears.
  2. Inside them, type INCLUDEPICTURE "" and put the cursor between the quotation marks.
  3. Press Ctrl+F9 again and type MERGEFIELD Picture inside the new braces.
  4. 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

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

Got a list and a letter? Generate your codes and merge them in one go.