Graham Mayor

... helping to ease the lives of Microsoft Word users.

Many people access the material from this web site daily. Most just take what they want and run. That's OK, provided they are not selling on the material as their own; however if your productivity gains from the material you have used, a donation from the money you have saved would help to ensure the continued availability of this resource. Click the appropriate button above to access PayPal.

Mail Merge Graphics Add-In

Mail merging graphics is complicated. If you want to see a more in depth discussion of the process then see my companion page on the subject where the process is explained. Users have however complained that the process described is complex. That may be so, but it it is the best that can be achieved with the Word product.

In an attempt to simplify the process for the non-technical user and to enable the complex field construction to be inserted with just a couple of mouse clicks, I have developed an add-in that takes care of all the behind the scenes activity for Word versions 2007 and later..

The add-in requires that the data source includes a single field that contains the filenames of the graphics. That filename may contain the filename extension (jpg, png, etc), or not as the extension can be selected from the main dialog. This allows for (say) a name field to be used, if the graphics files share the same names as the values of an existing field.

If there is no existing field that can be used in this way, or if the filenames are derived from a combination of field values, then the filename field values must be resolved in the data source before starting the merge process.

The add-in applies a button group containing two buttons to the Mailings tab of the ribbon, from where it is most logically accessed.

 

Insert Graphics Merge Field

The first button does exactly what it says on the label. If the current document is a merge document then you will see the following dialog. If not you will see a warning message and the function will quit.

There are two combo boxes from which you can select the field containing the graphics filenames and the file type, should the filename extension not be included in the record field data.

A check box is provided to confirm whether the field data includes the extension.

Enter the data required and click the button to enter the field construction at the cursor position.

The function does not check that the fields actually refer to graphics files. It assumes that you have configured the data to match the graphics files that you are attempting to merge.

The function will then prompt for the location of the graphics files, which must all be stored in the same folder.

Click OK and the field construction is inserted at the cursor position, similar to:

which will display an image in the document

If the document is a label merge document, then update the labels to transfer the field construction to all the labels.

Note that you will see the same image in each cell. This is normal and does not reflect the results of the merge.

 

Complete Graphics Merge

Having added any other fields that you wish to include in the merge, using Word's merge tools, (and updating the labels in the case of a label merge), all that remains is to complete the merge. To aid this and to ensure that the pictures added by the merge remain in the merge document as pictures, the merge should be completed using the second button 'Complete Graphics Merge'.

Most graphics merges will be to a new document, which can be printed as required, but in the case of a Letter merge, you will have the choice of merging to a new document or directly to the printer.

The merged document illustrated below shows the description field positioned below the graphic rather than above as in the previous illustration. The position of ancillary fields does not affect the merging of the graphic per se.

E-mail merges are not compatible with this function. If you are merging to e-mail, you may still use the main function to add the graphics field construction to the merge document.

The graphics and data file used in the above illustrations are included with the zip file.

For best results use image sizes close to the finished size they will appear in the document. Larger images can be constrained in size by insertion into fixed width table cells or frames.

Do not use text boxes to hold merge fields. Text boxes are in the graphics layer of the document rather than the text layer and the merge may behave unpredictably if fields are inserted in text boxes.

 

- Click here to download the add-in

 

 Mail Merge Graphics

This page features a relatively simple add-in to the the insertion of the field construction discussed at Mail Merge Graphics