How to Display Dynamic Excel Pictures in a Word Mail Merge
Question details
The user needs to insert variable or dynamic images from an Excel spreadsheet into a Word document using the mail merge feature.

- Product
- Word and Excel
- Device & OS
- not provided
- Scenario
- Creating personalized documents, such as ID cards or custom letters, via mail merge that require inserting specific dynamic images based on Excel data.
- Observed behavior
- Standard Word mail merge does not directly import or recognize pictures that are embedded inside Excel cells.
Ensure all your dynamic images are saved in a single local folder on your computer, and update your Excel spreadsheet to include a new column containing the exact file paths or file names of these images.
Use Word Field Codes for Image Mail Merge
By combining the INCLUDEPICTURE field code in Word with your Excel data, you can dynamically link to and display the correct image for each merged record.
Standard mail merge cannot read images directly pasted into Excel cells. Instead of embedding images in the spreadsheet, you need to store the image files in a local folder and reference their file paths in Excel.
When setting up the merge in your document, you will use a combination of the INCLUDEPICTURE and MERGEFIELD codes to instruct the word processor to pull the corresponding image for each record during the merge process.
Open your Excel spreadsheet and add a new column named 'ImagePath'. For each row, enter the full file path of the corresponding image (e.g., C:\Images\icon1.jpg). Save and close the Excel file.
Open your template document in Word. Go to the 'Mailings' tab, click 'Select Recipients', choose 'Use an Existing List', and open your prepared Excel file.
Click where you want the image to appear. Press Ctrl + F9 to insert empty field brackets { }. Inside these brackets, type INCLUDEPICTURE "".
Place your cursor exactly between the quotation marks of the INCLUDEPICTURE code. Go to the 'Mailings' tab, click 'Insert Merge Field', and select your 'ImagePath' column. The final code should look like this: { INCLUDEPICTURE "{ MERGEFIELD ImagePath }" }.
Press Alt + F9 to hide the field codes, then press F9 to update the fields (a placeholder image may appear). Finally, click 'Finish & Merge' to generate your individual documents with the dynamic pictures.

Easily Handle Mail Merge and Dynamic Data with WPS Office
WPS Office provides a robust and user-friendly Mail Merge feature in WPS Writer that is fully compatible with data from WPS Spreadsheet. It simplifies the process of inserting dynamic fields and managing complex document generation.
- 1. Open WPS Writer: Launch WPS Office and open your main template document in WPS Writer.
- 2. Start Mail Merge: Navigate to the 'References' tab and click on the 'Mail Merge' button to reveal the mail merge toolbar.
- 3. Import Data Source: Click 'Open Data Source' and select your prepared WPS Spreadsheet (.xlsx) that contains your text data and image paths.
- 4. Insert Fields and Merge: Use the 'Insert Merge Field' option to place your dynamic text and image path fields into the document, then click 'Merge to New Document' to finish the process.

Frequently Asked Questions
Why do I see the field code instead of the actual picture after merging?
You are likely viewing the field codes instead of the results. Press Alt + F9 on your keyboard to toggle between field codes and standard document text. If the image still does not appear, select all the text by pressing Ctrl + A, and then press F9 to force the fields to update.
Can I just paste the pictures directly into the Excel cells for the mail merge?
No, standard mail merge functionality cannot extract or read pictures that are directly embedded into Excel cells. You must save the images as separate files in a folder and put their specific file paths in the Excel spreadsheet.
How do I fix broken image links when sending the merged document to someone else?
If you use the INCLUDEPICTURE field without embedding the data, the images remain linked to your local computer's hard drive. To embed them permanently before sharing, select the entire merged document (Ctrl + A) and press Ctrl + Shift + F9. This breaks the field links and turns them into static, embedded images.




