How to Mail Merge With Photos for Each Recipient
🔍 WiseChecker

How to Mail Merge With Photos for Each Recipient

Mail merge in Word works well for letters and labels, but adding a unique photo for each recipient is not a built-in feature. The standard mail merge inserts the same image for every record. To show a different photo for each person, you need to use a field code that pulls the image file path from your data source. This article explains how to set up a data source with photo file paths, insert the correct field code, and run the merge so each recipient sees their own picture.

Key Takeaways: Mail Merge With Individual Photos

  • Data source column with full image file paths: Each recipient must have a column containing the exact path to their photo file, such as C:\Photos\john.jpg.
  • Insert Merge Field code with INCLUDEPICTURE: You must manually edit the field code to use the INCLUDEPICTURE field instead of the normal Insert Merge Field option for images.
  • Press F9 after merging to refresh images: After the merge, each photo shows the same placeholder. Press F9 on each field or use a macro to update all fields to the correct image.

ADVERTISEMENT

How Mail Merge Handles Images and Why a Workaround Is Needed

Word’s mail merge feature was designed primarily for text. When you insert a merge field for an image, Word places a reference to the image file path rather than embedding the image itself. During the merge, Word uses the INCLUDEPICTURE field code to load the image from the path provided in your data source. If you use the standard Insert Merge Field button for an image column, Word treats the path as text, not as an image. The result is that every merged document shows the same picture or no picture at all.

The solution requires three components:

  • A data source such as an Excel file or Access database that contains a column with the full file path to each recipient’s photo. The path must include the drive letter, folder, filename, and extension.
  • A Word mail merge main document set up with the INCLUDEPICTURE field code manually edited to point to the merge field for the photo path.
  • A final step to update the fields after the merge so each document displays the correct photo.

This method works with any image format that Word supports, including JPEG, PNG, BMP, and GIF. The photos must be stored locally or on a network drive that Word can access during the merge. Storing images on cloud-only storage without a local sync folder may cause broken links.

Steps to Set Up a Mail Merge With Individual Photos

  1. Prepare your data source with a photo path column
    Open your data source file, such as an Excel workbook. Add a new column named PhotoPath or a similar label. In each row, type the full path to the recipient’s image file. For example: C:\Photos\John.jpg. Ensure there are no extra spaces or quotation marks in the cell. Save and close the data source.
  2. Create or open your main document in Word
    Open Word and start a new blank document or open an existing letter template. Go to Mailings > Start Mail Merge and choose the document type, such as Letters or Email Messages.
  3. Connect the data source
    Go to Mailings > Select Recipients > Use an Existing List. Browse to your Excel file or other data source. If using Excel, select the worksheet that contains your data. Confirm that the PhotoPath column appears in the list of fields.
  4. Insert the INCLUDEPICTURE field code
    Place your cursor where you want the photo to appear. Do not use the Insert Merge Field button for the photo. Instead, press Ctrl+F9 to insert a pair of curly braces { } for a field code. Inside the braces, type the following exactly:
    INCLUDEPICTURE "{MERGEFIELD PhotoPath}" \ MERGEFORMAT
    Replace PhotoPath with the exact name of your photo path column. The backslash and asterisk before MERGEFORMAT preserve formatting. Press F9 to update the field. You will see a placeholder text like { INCLUDEPICTURE "{MERGEFIELD PhotoPath}" }.
  5. Position and format the photo placeholder
    The field code will render as an empty box or a broken image icon. Right-click the field and choose Toggle Field Codes to switch between code and preview. To set a fixed size for the image, right-click the field, select Format Object, and set the Height and Width. This size applies to all merged photos.
  6. Complete the merge
    Go to Mailings > Finish & Merge > Edit Individual Documents. Choose All and click OK. Word creates a new document with one page per recipient. Each page shows the same broken image placeholder or the same incorrect photo because the fields have not been updated yet.
  7. Update the fields to show each recipient’s photo
    In the new merged document, press Ctrl+A to select all content. Press F9 to update all fields. Word reads the file path from each record and loads the correct image. If the images still show as broken, check that the file paths in the data source are valid and that the image files exist at those locations.

Alternative Method: Using a Macro to Update Fields Automatically

If you merge frequently, you can run a short VBA macro to update all INCLUDEPICTURE fields in the merged document. Press Alt+F11 to open the VBA editor. Insert a new module and paste the following code:

Sub UpdateAllINCLUDEPICTUREFields()
    Dim fld As Field
    For Each fld In ActiveDocument.Fields
        If fld.Type = wdFieldIncludePicture Then
            fld.Update
        End If
    Next fld
End Sub

Close the editor. Run the macro by pressing Alt+F8, selecting UpdateAllINCLUDEPICTUREFields, and clicking Run. This updates every photo field in one action.

ADVERTISEMENT

Common Problems and How to Solve Them

All merged documents show the same photo

This occurs when you used the standard Insert Merge Field for an image column instead of manually inserting the INCLUDEPICTURE field code. Delete the image field, press Ctrl+F9 to insert a new field, and type the code exactly as shown in Step 4 above. Ensure the MERGEFIELD name matches the column name in your data source.

Photos appear as red X or broken image icons after updating fields

A red X means Word cannot find the image file. Verify that every file path in the data source is correct and that the files exist. Check for typos, missing drive letters, or incorrect folder names. If the images are on a network drive, use the UNC path such as \\Server\Photos\John.jpg instead of a mapped drive letter.

Photos are cropped or distorted

Word scales images to fit the placeholder size. To maintain the original aspect ratio, right-click the field code placeholder in the main document before merging, select Format Object, and go to the Size tab. Check the Lock aspect ratio box. Set the height or width only; Word will adjust the other dimension automatically.

Field code shows curly braces but not the image

Word displays field codes instead of field results when the Show Field Codes option is enabled. Press Alt+F9 to toggle between showing field codes and field results. If the field still shows the code after pressing Alt+F9, right-click the field and select Toggle Field Codes.

Item Standard Mail Merge (Text Only) Mail Merge With INCLUDEPICTURE Field
Data required Text columns only One column with full file paths to images
Field insertion method Mailings > Insert Merge Field Manual Ctrl+F9 field code with INCLUDEPICTURE
Image display after merge Shows the same image for all recipients Shows a placeholder until fields are updated with F9
Supports different photos per recipient No Yes
Requires field update after merge No Yes

With the INCLUDEPICTURE field code and a properly prepared data source, you can create personalized documents with a unique photo for each recipient. After the merge, remember to press Ctrl+A then F9 to update all images. For repeated merges, store the main document as a template with the field code already in place. As an advanced step, consider using a Word macro to automate the field update process and save time on large batches.

ADVERTISEMENT