Merge Images    Merge Barcodes    Store    How-To   Support    Contact Us    Free Trial  
View Cart
What are you looking for today? Search

IncludePicture and OnMerge: Mail Merge Variable Images, Pictures, Photos with Microsoft® Word

A Tale of the Easy Way and the Hard Way Word IncludePicture Signature Mail Merge

First the hard one...

Step-by-Step How-To Using INCLUDEPICTURE
 (The Hard Way)

Microsoft Word includes hidden features to support mail-merging different images into your documents. You're about to learn how to use them.

Instructions how to use an INCLUDEPICTURE field in your Microsoft Word Mail Merge document to merge pictures, signatures, etc:

  1. Name the picture or image files the same as (keyed to) the contents of a field in the database. For example, if you have a database which includes a “FirstName” field, you might name personnel photos “John.jpg,” “Mary.jpg,” and so forth. The key to variable images is to have a collection of photo or image files in a folder on your computer or network.
  2. Save As the document in the Word 97 - 2003 (.doc) format -- NOT the Word 2007 (.docx) format. IncludePicture does not work in .docx documents due to a bug in Word. [Not an issue if you use Word XP or 2003.]
  3. Select the data source (database) into the master document you’ll be working with using Mailings + Select Recipients + Use an Existing List.
  4. Locate where you want to position your image, and insert an image from the image collection (any of them will do for now) onto the page in the usual manner using Insert + Pictures. However, do not press the Insert button at the bottom of the dialog box as usual after selecting the file. Instead, press the little triangle on the right edge of that button to get a three-line menu, and click “Link to File.” Do not format or resize the picture.
  5. Press the Alt + F9 key combination to make the image into a variable image. The picture you just inserted will become something like this on a gray background:
    { INCLUDEPICTURE “c:\\staff\\pictures\\John.jpg” \*MERGEFORMAT \d }
    Note that copying and pasting the above text from this article into Word will not work; you must carry out this procedure as-is.
  6. Select and delete the filename portion, but leave the folder name(s) with the backslashes, and leave the file’s “extension” (.jpg in this case, might be .gif, .bmp, .tif or other). In this example we’ll only remove “John” and the line will now look something like:
    { INCLUDEPICTURE “c:\\staff\pictures\\.jpg” \*MERGEFORMAT \d }
  7. Leave the cursor where “John” used to be, press Mailings + Insert Merge Field and select the database field you need. In this example, you’d get:
    { INCLUDEPICTURE “c:\\staff\\pictures\{ MERGEFIELD “FirstName” }.jpg” \*MERGEFORMAT \d }
  8. Press Alt + F9 again to go back to Picture View to view your handiwork.
  9. Run the Mailings, Finish & Merge, Edit Individual Documents or [or for Word 2003 and XP: Merge to New Document]. Do not merge to a printer, fax or e-mail.
  10. Select the new document; Press Ctrl + A; Press F9.

Working Around INCLUDEPICTURE Image Size and Rotation Problems

The photos in the merged document will probably be the wrong size. Also, photos taken in portrait (tall & narrow) orientation may be rotated onto their side.

Do not attempt to change the picture in the original Word document. If you do so, the change will appear to work, but Word will change the image back to the incorrect size or rotation as soon as you do a merge. To put it politely, this is one of Word’s quirks: whenever it merges in a new image, Word resets the image to its “natural” state. That’s just the way Word works, so you must work around it.

There are three ways to work around the image-size/rotation quirk: (a) before merging, change all original images’ size and orientation to the desired size using Photo Editor or similar software, (b) after the merge is done, manually resize/rotate troublesome images in the resulting document, or (c) see “The Easy Way...” below for another kind of solution. Those are the only known options, aside from unfriending Bill Gates...

Beware Missing Photos and Images

The other thing you may have noticed on your printed page is that some of your images are missing, with a box containing a red X in their place. That is what Word does if the database look-up comes up with a file name which doesn’t exist.

There’s no way to get rid of the red X except to give Word what it wants: an image file. If you don't want an occasional red X, you can either (a) fix your database if the data is genuinely incorrect, or (b) create suitably-named all-white "dummy" image files for each missing name using Photo Editor or other program.

The data you’re testing with may not have missing image files, but be aware that missing images may occur when you roll out your master document with a larger database. It’s important to take steps to check data to make sure that it’s clean, or that there are dummy files for all missing names.

Checklist Summary

Admittedly, INCLUDEPICTURE can difficult to use, but can be very rewarding. In summary, here's how to take the basic steps for successful variable image mail-merging:

  1. Rename image files to match the database (or change the database to match images);
  2. Setup coding of merge fields using a database;
  3. Resize each image file to the correct size and orientation;
  4. Check and scrub the database of names that don’t have corresponding image files (or create dummy blank images);
  5. Run the Merge to New Document;
  6. In the new document, press Ctrl + A followed by F9


The Easy Way: Use Power Tools

If you don't want to deal with all of the above or if need to merge directly to e-mail, fax or a printer, there is a little Word addin software called OnMerge Images which automates mail-merging variable images. Add-ins are small third-party programs which extend Word's power without disturbing Word's familiar features.

OnMerge Images creates variable images with a few clicks in a simple dialog box, automatically works around all of Word’s quirks, and lets you do things that are virtually impossible with INCLUDEPICTURE. Those extras include:

  • completely eliminate manual INCLUDEPICTURE coding,
  • merge directly to e-mail, fax and printer,
  • merge pictures from websites,
  • automatically resize each merged image to fit a specific box size without “squishing” the image nor resizing the original,
  • auto-rotate portrait images to the correct orientation,
  • optionally skip or blank-out missing images,
  • optionally merge only database records with valid images,
  • warn if an image is missing, and
  • compose an image file name from multiple database fields (such as FirstName + LastName).

Does the add-in truly make variable images easy? Yes – our experience is that anyone familiar with photos and with basic mail-merging can merge variable images in a few minutes using OnMerge Images.

You can find out more about OnMerge Images, watch a video of the add-in in action, and download a free trial version from OnMerge’s website at

Copyright © 2005 - 2017 Soft Horizons     All trademarks are property of respective owners. Privacy Policy    Terms & Conditions