Merging Graphics into Word Documents

Written by Allen Wyatt (last updated September 29, 2020)
This tip applies to Word 97, 2000, 2002, and 2003


4

The mail merge feature in Word is extremely powerful, and you can use it to easily create customized versions of documents from information in a data source (such as a Word table, an Excel worksheet, or an Access database). Normally the mail merge feature is used to merge text into a document—items such as a customer name or a part number. There may be times, however, when you want to merge a graphic into your document.

The key to merging graphics is to make sure that you don't try to merge the graphic itself, but to merge a field that "points" to the graphic file. For instance, you might have an Excel worksheet that contains a group of real estate listings. Just make sure you set up your worksheet so that it contains the file address of the graphic you want to merge. Each record in the worksheet should have a complete drive name, path, and file name (in a single column) for the graphic associated with that record. The following is an example of such a file address:

d:\listings\myhouses\smithhouse.jpg

For the purposes of this discussion, let's assume that you named the column PictureLocation. When you create your merge document in Word, you can include a merge field such as this:

{INCLUDEPICTURE "{MERGEFIELD PictureLocation}" \d}

Notice that this is actually two fields within one. It is important to make sure that you include the quote marks, as indicated. When Word merges the document, it replaces the MERGEFIELD field with the data indicated. Thus, the example would become this:

{INCLUDEPICTURE "d:\listings\myhouses\smithhouse.jpg" \d}

The remaining INCLUDEPICTURE field is then translated by Word as a directive to include the noted picture.

It is important to remember that after you perform your merge operation in Word, it may appear that your graphic merge didn't work properly. To speed things up, Word displays the same picture for each of the INCLUDEPICTURE fields. Thus, your merged document will appear as if it contains multiple instances of the same picture. This simply occurs because Word doesn't update the INCLUDEPICTURE field for each record it merges. To force this, simply select the entire document (Ctrl+A) and press F9 or print the merged documents. (Word updates all fields prior to printing.)

WordTips is your source for cost-effective Microsoft Word training. (Microsoft Word is the most popular word processing software in the world.) This tip (1548) applies to Microsoft Word 97, 2000, 2002, and 2003.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Getting Context-Sensitive Help

Word employs what is called a context-sensitive help system. This means that the program tries to direct you to the ...

Discover More

Changing Outline Structure

When working with the outline of a document, you can easily move whole sections of your document. It is as easy as ...

Discover More

Determining How Many Windows are Open

Does your macro need to know how many windows Excel has open? You can determine it by using the Count property of the ...

Discover More

Create Custom Apps with VBA! Discover how to extend the capabilities of Office 2013 (Word, Excel, PowerPoint, Outlook, and Access) with VBA programming, using it for writing macros, automating Office applications, and creating custom applications. Check out Mastering VBA for Office 2013 today!

More WordTips (menu)

Capturing a Screen

Windows provides a way of "capturing" the image on the screen into the clipboard. You can then paste the image from the ...

Discover More

Only Inline Figures Can be Seen and Printed

Insert a graphic into a document and you expect to be able to see it. What do you do if it isn't displayed, however? Here ...

Discover More

Horizontal Alignment Errors for Graphics

Discussion of alignment differences for graphics in Word 97 and Word 2000.

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] (all 7 characters, in the sequence shown) in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is three more than 2?

2017-12-20 11:42:38

JT Sullivan

Worked thru this procedure and get the error message: This image can not be displayed. The file may have been removed, renamed or deleted.

Could it be that a .png file is not recognized.? I got the images using the Snit it tool from a pdf file. If so, is there a conversion process to a usable image file?

Thanks


2017-07-18 12:47:28

Scott

What if I am using an XML Mapping within the {IncludePicture} insert above. I can't seem to get this to work. It keeps changing the XML Mapping to just plain text.


2017-01-18 11:54:15

margie

you have to include "around the string" in excel also


2016-12-20 08:47:37

Danny

Hi Allen,
You could use https://document-merge.com/ It's an online service that integrates Excel data into a Word document.
Cheers,
Danny


This Site

Got a version of Word that uses the menu interface (Word 97, Word 2000, Word 2002, or Word 2003)? This site is for you! If you use a later version of Word, visit our WordTips site focusing on the ribbon interface.

Videos
Subscribe

FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.