IncludePicture: How To Mail Merge Graphics and Photos in Microsoft Word Step By Step

Do you need to put different people's pictures and signatures on different letters, create photo directories or face books, print invitations or place cards with logos on them, print photo ID cards? Maybe you regularly produce a report with different photos in it?

If so, Microsoft Word has a feature that may be for you: mail merging images with the IncludePicture field.

Some Examples

I know an engineering company that produces many site inspection reports every day. The reports are all mail merged from the same report template and use IncludePicture to automatically drop in digital photos of the inspection site.

Other folks use IncludePicture in sales letter mailings to insert the appropriate salesperson's photo and signature.

I spoke to a lady who's in charge of producing the annual student photo directory for small college. By using IncludePicture, she was able to do what used to be a five-week job in less than one week!

How To Use IncludePicture

This step-by-step explanation has been excerpted from an online article on using IncludePicture and is included here by kind permission of its author.

Try to follow the instructions very, very precisely. IncludePicture finicky and won't work if you so much as breathe on it the wrong way.

  1. The key to variable images is to have a collection of photo or image files in a folder on your computer or network, and to name the images files the same as 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.
  2. If you're using Word 2007 or later, 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. Don't bother reporting the bug to Microsoft: they've known about it for a long time.
  3. If it's not already selected, select the data source (database) into the master document you'll be working with. Only if you're using Word 2003 or before, also make sure that the Mail Merge toolbar is visible in Word's menu bar; if not: Tools + Customize, check off the Mail Merge box.
  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 + Picture + From File. However, do not press the Insert button 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. You're now ready to make the image into a variable image. Press the Alt + F9 key combination. 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 written. Notice that the backslash ("\") characters in the filename are doubled-up. This doesn't refer to the \* and \d at the end -- just the \\'s in the filename. Word requires all backslashes in file names to be doubled. If you ever need to edit the folder names, you must double up any backslashes that you add.
  6. Select and delete the filename portion ("John: in this example), but leave the folder name(s) with doubled-up backslashes, and leave the file's "extension" (.jpg in this case, might be .gif, .bmp, .tif or other). Be sure that you do not delete the blanks after the { and before the }. In this example we'll only remove "John" and the line will now look something like:
    { INCLUDEPICTURE "c:\\staff\\pictures\\.jpg" \* MERGEFORMAT \d }
  7. Leaving the cursor where "John" used to be, select the [for Word 2007+: Mailings, Insert Merge Field] or [for Word 2003 and before: Insert Merge Fields button from the Mail Merge toolbar (typically the fifth button from the left)], 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 so that you can view your handiwork.
  9. Run the [for Word 2007+: Mailings, Finish & Merge, Edit Individual Documents] or [for Word 2003 and before: Merge to New Document] (not to a printer, fax or e-mail).
  10. Don't miss this step, it's very important: Select the new document; Press Ctrl + A; Press F9.
  11. Go through the merged document and "manually" do any necessary fix-ups to image size or rotation.

Are Those Barcodes You're Mail Merging?

If you're merging barcodes, check out my Hub about Word's DISPLAYBARCODE.

Is IncludePicture for You?

First, a reality check: as you can see from the huge pile of questions and comments below, using IncludePicture is a "project." In other words, plan to put some time into learning this and getting it dialed in. If you just need to get something done quickly and move on, or if you're the impatient type, IncludePicture may not be for you; see under the Alternatives... heading below.

For all of its usefulness, IncludePicture does have some gotchas that may limit its usefulness to you. Here, I'll discuss those traps and suggest some ways of working around some of them.

  • As you can see from the directions above, you must first Merge To New Document, select the new merged document, press Ctrl + A, and press F9 before saving or printing your new document. That means large merges will take longer because you cannot merge directly to the printer. Also, the additional steps may require you to specially train anybody who may need to run the mail merge operation, including temporary and replacement staff.
  • You cannot mail merge to e-mail or fax since you must Merge To New Document. The last point can be critical because merging directly to e-mail or fax is the only way to make Microsoft Word use e-mail addresses and phone numbers from the database to send your message.
  • You'll need to do some manual coding of mail merge fields. Not a problem for some people — but a major issue for others — depending on skill level. ‘Nuf said.
  • All of the images that will show up in a given position on the page must be the same size, and you must not adjust (shrink or stretch) those images' size in Word. That is because Word will reset all the merged images' size back to their default (i.e. the size they show up in when you initially Insert an image into the document) when they are merged. If you're not working with too many images, you can either resize all of the images before merging them using Photoshop or other photo editor, or you can resize each image in the new document after the merge.
  • Portrait-orientation photos will often be merged into the document in landscape orientation, or vice-versa. That's the usual deal for any images inserted into a Word document since Word ignores the tags in JPEG photos that describe which way the camera was turned when the picture was snapped. You must either pre-rotate and save the photos using an image editor, or manually rotate them in the merged Word document.
  • You must have an image (or images) for each data record you merge. Otherwise Word will merge in an ugly X icon whenever no image is available to match the data. Unfortunately it's difficult or impossible to tell word to simply blank out missing images.
  • IncludePicture only stores the images' file names (not the images themselves) in the new document. That means that computer you send the merged document to must have access to a copy of the same image files.

Alternatives If these Limitations Are a Deal-Breaker

Don't give up on mail merging images into your project if one of more of these limitations is a problem. Rather, look into a little one-of-a-kind Microsoft Word add-in called OnMerge Images. The add-in works around all of the IncludePicture limitations I've listed above (including rotation), and makes the entire picture merging process downright easy. It is the only way I know of to mail merge variable photos and images to e-mail or fax with Word. Recommended by me.

More by this Author

Comments 137 comments

David  7 years ago

Thanks Wordnut,

This tutorial was very useful. I'm a project manager and one of my projects involves the printing of membership cards where the details are stored in a database. I was struggling with coming to terms with the limitations in word but your summary of the disadvantages were very clear. The OneMerge add-in works like magic and I will definetly encourage my client to buy it.

Thanks a million.


Steve 7 years ago

The section about merging blank images is not fully true... Granted that if there is no image to merge you will get the red cross... But if you toggle the merge field so that only the code is showing you can set the code to white meaning that if there is a photo it will merge if there is not it will not print the merge code.

Tom Vamos 7 years ago

Very handy ... thanks

dt 7 years ago

Are there issues if you are calling your signature file from a shared network drive? I keep getting the same sig for 1 person instead of each person's signature in my merge.

Holly 7 years ago

Thanks for the article very useful. For some reason my Alt + F9 option is not producing the code but rather the image?? Any ideas?

wordnut profile image

wordnut 7 years ago from Californiaaah Author

Steve: great idea, using white text... sneaky trick!

dt: Word has a bug when dealing with so-called UNC paths, e.g. \\server\c\x.jpg. Use 2 *forward* slashes at the beginning instead, e.g. //server\c\x.jpg

Holly: Whenever Alt+f9 doesn't work for me, it's because my fancy Microsoft keyboard has these annoying alternate meanings for the F-keys, e.g. F9 can mean "Send" on my board. On such keyboards, there's an F Lock button that toggles the F-keys back to their normal meaning. Does that help?

Guest 6 years ago

I found a way around the sizing problem if you want to restrict the image size, create a table in your Word template and adjust to the size you want the image to be, then insert the IncludePicture text into the table and then once merged the image will fit the table. (This does not seem to work if you want to increase the original image size.)

Robert Swift 6 years ago

This doesn't seem to work in MS Word 2007.

wordnut profile image

wordnut 6 years ago from Californiaaah Author

Robert: IncludePicture is badly broken in Word 2007. The workaround is to save your document in Word 2003 format.

I have confirmed that this is a bug with Microsoft support. They say the problem will likely be fixed in the upcoming Word 2007 Service Pack 3, but no guarantees and no time estimates.

TP 6 years ago


I would very much appreciate your help.

I tried the steps suggested, but the only picture that shows is the one originally used for step 3 "3.Locate where you want to position your image..."

I did click on "Link to file", and the code that appears is this:

{INCLUDEPICTURE "../../../Users/user/Pictures/{MERGEFIELD"Imagen"}.jpg" \* MERGEFORMAT \d}

However, the only picture it shows is one used for step 3.

Thanks and regards,


wordnut 6 years ago

TP: relative paths (i.e. with ../../../) in Word are rather shaky. What happens when you use an absolute path?

TP 6 years ago

Thanks for your reply.

I've tried using:

{ INCLUDEPICTURE "C:\\TALINA\\GV\\Dis\\Condos\\Pics\\{MERGEFIELD "Imagen"}.jpg" \* MERGEFORMAT \d}

And the inserted picture remains. It won't change like the rest of the document, that is, text retrieved from the database is working... just not the pictures.

In excel, I have used just the name of the picture (e.g. image1), and I have tried it with the complete path (e.g. C:\\TALINA\\GV\\Dis\\Condos\\Pics\\image1.jpg

TP 6 years ago

Note: I have also tried with only one backslash instead of two :)

wordnut profile image

wordnut 6 years ago from Californiaaah Author

1) There's a blank missing after the \d switch

2) Did you merge to a new document, select all (Ctrl-A) in the document and update (F9)?

TP 6 years ago

Done. It worked!!!! Thank you so much!!!

dawrana 6 years ago

I'm having the same problem as TP.

I'm at Step 4 of 6 in Mail/Merge. I've then successfully followed Steps 1 through 6 of IncludePicture (above). Is Step 7 (press Alt + F9) just to view, or is it a required Step?

More importantly, what about the "Update all labels" button in the Mail/Merge? No-one seems to mention this (unless I've missed it?). How does this tie in to the "Merge to New Document" instruction at Step 8?

Will someone please spell out the required Steps (baby steps, please!) immediately after Step 6 of IncludePicture - but importantly including the necessary steps in Mail/Merge too.

Thank you very much.

wordnut profile image

wordnut 6 years ago from Californiaaah Author

dawrana: All steps are necessary.

Update all labels: I have to keep this quick because this hub is limited to the IncludePicture feature. Briefly, when you're making labels or cards where there are several records on one page, you can edit the first label on the page and then save time by using Update all labels to copy the first label to the other labels on the page.

There are already many great tutorials about this available (do a search for Mail Merge Wizard Labels), and there's a step-by-step tutorial video that demonstrates using Update all labels with variable images at at around the 6:00 minute mark. That video uses an add-in to generate the picture, but all the other steps shown are the same if you use IncludePicture instead.

dawrana 6 years ago

Great advice - thank you very much. As you surmise, I am creating some "four-up" pages, so the "Update all labels" step is kind of crucial to the instruction steps for IncludePicture.

Incidentally, I notice a change to Step 9 (used to be Step 8). This now refers to Word 2007/10 and to Word 2002 and before. Please, what about Word 2003?

Finally, you recommend that all the images should be the same size. For the avoidance of doubt, do you mean inches or pixels? I know that inches equals pixels/dpi. I'd just like to be clear which applies in your advice.

Thank you very much.

wordnut profile image

wordnut 6 years ago from Californiaaah Author

dawrana: Oops! Thanks for catching that. I meant Word 2003 and before -- not 2002.

Size all of the images to the same number of inches/centimeters. That's what Word uses to determine how big it should make the image on the page. Of course images are actually a bunch of pixels, but most image formats contain resolution information that tells the reader how many pixels per inch the image should be displayed at. Different images can have different resolutions, so Word multiplies the number of pixels times the images' resolution to get the default size on the page.

Rory 6 years ago

Thanks Wordnut,

Many hours spent before you provided the missing piece here (just doesn't work in docx). Hopefully I can save some time from here on in.

best wishes

pSquared 6 years ago

I've inserted the image using "link to file", but when I get back to my document and do the 'alt+f9' it won't show any of the code. Any insight on that one?

wordnut profile image

wordnut 6 years ago from Californiaaah Author

pSquared: Make sure you're saving the document as a .doc -- NOT a .docx. Word has a bug that causes it to lose IncludePicture fields.

Barry 6 years ago

Driven myself mad trying to get this to work and I can't. First discovered that if you have spaces in the directory names it replaces them with gobbledegook, but the command looks correct now, and still nothing. It just leaves the same picture on every record. Why can't Microsoft write software that actually works? And how did they get so successful peddling the rubbish they sell.

wordnut profile image

wordnut 6 years ago from Californiaaah Author

Barry: don't give up! Try the addin mentioned at the end of the article. It makes IncludePicture easy, which is what MS should have done in the first place.

Gambuzino 6 years ago

This helped me a lot.

But every detail counts!

At firtst I had the same problems of some here but after putting:

1) There's a blank missing after the \d switch

2) Using the absolute path

3) Putting two backslah \\

It worked :-)

Thank you so much!

Sue 6 years ago

I'm having a problem with this. I'm trying to insert an image conditionally; if the contents of my field = UK I want to insert a graphic called UK.jpg and I cant get this to work with the If, else command. this is what I am using:


Any help gratefully received!

oyi kresnamurti 6 years ago

great tutorial. thank you, now i can make it on word 2007. unfortunately, it can't be used for other output than 'edit individual documents'. i wish i can use this procedure with 'send e-mail messages' output. can we?

wordnut profile image

wordnut 6 years ago from Californiaaah Author

Gambuzino: thanks for catching that. Fixed it.

Sue: Word is very annoying and picky about spaces within fields. Looking at your comment, there are spaces missing in there. I'd try going thru the procedure outlined in the article *exactly* as shown, being very careful to not delete any spaces. They're not optional.

Oyi: thanks for pointing that out. I've updated the Hub to state that the only way I know of to merge pix to e-mail is to use the add-in I mentioned at the end of the article.

Robert 6 years ago

Hi all,

I'm (fairly!!) OK at doing picture mailmerges in Word 2003 but have been failing to get it to work in Word 2007. Thanks for confirming that it's not possible yet, but that I must use compatability mode.

Let me join into the post by saying (with other people) it is ESSENTIAL(!!!) to follow the syntax given in the ten steps at the top of this post. Don't get caught out by missing spaces where they're needed.

And don't give up! You won't get the required end-result until you've merged to a "New Document", then perform "Select All" (CTRL A) and "Update" (F9).

...suggestions that you also need to do this at midnight, at the time of a full moon, having slaughtered a chicken, etc., are just exaggerations.

TP 6 years ago

Hi, I´m back! They´ve updated to Word 2010 and I'm having problems again :S

In order to get the absolute path, I tried unchecking the 'Update links on save' option, same as last time. Only that this time, it still doesn´t give me the absolute path. Any other ideas on how to get the absolute path?

Thanks and regards

Sten 6 years ago

Thanks alot for this info after trying it out myself to vain this really did help. 2 hours trying to find the solution how to merge pictures; seriously cant believe that microsoft dont make this a bit simplier.

Andrew 6 years ago

Thanks for help - I was doing everything right but was using latest version of word so saving as docx. I then saved the merged document as .doc (actually completed the merge), then selected all and updated and bingo - worked. Cheers Andrew

Claudette 5 years ago

I have used the code {INCLUDEPICTURE "f:\\members\{MERGEFIELD "ID"}.png" \* MERGEFORMAT \d} and all I get when I hit the alt+F9 key is a blank. The ID part in the Excel document corrisponds to numbers, could that be the problem?

wordnut profile image

wordnut 5 years ago from Californiaaah Author

Claudette: 1) make sure there's one space after each { and before each }, and 2) f:\\members\{merge... needs to have the 2nd backslant doubled up. Cheers!

danabrooke 5 years ago

This step by step page was so helpful - thank you!

I wrote the procedure for doing mailmerges with images for our entire office. But i have some unusual issues:

First, it only seems to work on my computer, not on any other computers in the office (identical dell laptops)... even when i'm the one following the steps on their computer. The images never show/they stay as the boxes with red X's.

Second, I can't successfully follow the steps twice in a row for the same document on my own computer! For example, I just did it all completely successfully about 30 minutes ago, but when i do the exact same steps again to show someone, it won't work! this happens everytime i try to do it more than once in a day.

Any thoughts?


wordnut profile image

wordnut 5 years ago from Californiaaah Author

Dana -- sounds like you're creating a docx. Word has a very frustrating bug that causes it to lose IncludePicture fields in docx's at random intervals. Use a .doc (Word 97-2003 format) instead. Save the document as that format *before* inserting the IncludePicture. If you're required to use.docx, you'll need to use the addin referenced near the end of the article to pull it off.

Eping Sasa 5 years ago

This for this very useful tip. I was able to merge using both a picture in my local hard drive and a picture in our website!

chrisn7 5 years ago

I am almost there, but where a signature name changes in my main database, the actual signature on my merged document doesn't. However, using Alt+F9 at each document signature shows that the correct name is being requested, but not returned to the document?

wordnut profile image

wordnut 5 years ago from Californiaaah Author

@chrisn7 Don't forget the all-important step 10.

Andre 5 years ago


I am a photographer involved in graduation ceremonies at Universities. During such a graduation day I have a database with student names and detail and we might photograph 2000-3000 students per day. I am in search of software that can assist in linking the database entry to the photo (or photos ) of the individual. What I can gather from what similar company elsewhere in the world are doing, is that they issue each student with a unique barcode (linked to their database entry). As the student gets to the photographer the barcode gets scanned and the software link the images to follow with the database entry.

Do you have software or ideas that can help with this process?



NS 5 years ago

Hi there,

I need help please, I been trying this for a few hours and still can't get it to work.

{ INCLUDEPICTURE "C:\\Documents and Settings\\a56000\\My Documents\\Mail Merge Test\{ MERGEFIELD First_Name } { MERGEFIELD Last_Name }.jpg" \* MERGEFORMAT \d }

I have also tried by creating another column in the data base that have both first name and last name together to avoid the two mergefield, it doesn't work either.

Please help.

Thank you in advance.


wordnut profile image

wordnut 5 years ago from Californiaaah Author

@NS you need to double-up the \ after "Mail Merge Test"

dawrana 5 years ago

In Windows 7 and Word 2010, my IncludePicture file won't toggle using Alt + F9.

At Step 4, I Insert the required picture using "Link to File" as before. However, when I try to toggle, using "Alt + F9" (Step 5), nothing happens. Any ideas, please, about what's happening? I don't want to have to Insert a string of code - I'm hoping to be able to follow the old technique. The database is .doc, not .docx and I think I'm following all the same steps as before. The inserted data fields all toggle correctly - but not the inserted picture. Do I need to change my "View"? Help, please. Thank you.

NS 5 years ago

Hi Wordnut,

Thank you for noticing that. However, once I did the next step which is edit all individual to a new document, its giving me the same picture as the first one although the name of the mail merge changes. But not the picture.

Please help.



wordnut profile image

wordnut 5 years ago from Californiaaah Author

@dawrana: I gather that the field coding that doesn't change with Alt-F9 just stays as text, right? I'm guessing that you just pasted in ordinary {}'s instead of inserting them with Crtl-F9. Different thing entirely. Please follow steps 4 & 5 to the letter to avoid these problems.

@NS: Don't forget to do Step 10.

LB 5 years ago

No matter what I do, whenever I merge to a new document the picture that I originally inserted shows up in all of the fields. I have used every combination of slashes I can think of and have made sure all of the spaces are correct. Why won't this work? Someone please help.

wordnut profile image

wordnut 5 years ago from Californiaaah Author

@LB Sounds like you eigher skipped step 10, or were using the .docx format during some step of of creating your master document (see step 2).

LB 5 years ago

When I hit F9 after I have merged to a new document the pictures don't show up at all, just a little x in the top left corner.

wordnut profile image

wordnut 5 years ago from Californiaaah Author

@LB Use F9, then Alt-F9 on the new document to see what the fields look like with the database merged in. You'll probably find that the name in the field is messed up, the database field name isn't valid, or the database doesn't contain what you expect. Any names or parts of names you manually code in the field must have backslants doubled-up. If you're using network file names, I recommend using ones on the local disk instead since Word gets confused by the \\ in \\SERVER\... File names *from the database* don't need the backslants doubled-up.

LB 5 years ago

@wordnut Thank you for the help, it finally worked!

BSP 5 years ago

thanks dude..this is what I want...

Jamie 5 years ago

I'm using a .doc file and getting the data from an Access database. I have my signature field set up as { INCLUDEPICTURE "{ MERGEFIELD "S_Signature" }.JPG" \* MERGEFORMAT \d } The S_signature field has the path and file name without the extension. I can view my document, send it to the new document and update it and all works great. When I save my original document, my field changes to: { INCLUDEPICTURE "Signatures/Wendy.JPG" \* MERGEFORMAT \d } and it no longer uses the mail merge field. I'm trying to create a letter that my team of 5 uses. All the other mailmerge fields work great except the signature. My company is too cheep to buy software. :( Any ideas as to what is going on here?

Jamie 5 years ago

If you have problems saving your linked image like I did above, do this:

Select Tools > Options > General > Web Options and uncheck 'Update links on save'

WT 5 years ago

Hi can anyone tell me why my code doesn't have 2 backlash automatically? I cant continue after being stuck here.

Code - {INCLUDEPICTURE "Profile/Pehin.jpg"\*MERGEFORMAT\d}

Will really appreciate if anyone could help :)

wordnut profile image

wordnut 5 years ago from Californiaaah Author

@WT 1) You need to manually double-up backslashes yourself. 2) Blanks/spaces as shown in examples are not optional -- every single one must be there. I'll be the first to admit that IncludePicture can be a real bear (notice all the comments/questions above), but don't give up!

Officer 5 years ago

great article, I'll try it tomorrow

WT 5 years ago

@wordnut Thank you so much! I will try till i finally get it! Thank you!!

WT 5 years ago

Hey wordnut, I had manage to merge. However, after i click finish and merge - edit individual documents, my picture for each of the different badge is the same. May i ask what has gone wrong?

WT 5 years ago

I realise my mistake was step 10. So i click ctrl + A then F9. But, this time round all my pictures all gone and replace by the red cross. How should i go about from there?

Many thanks.

Officer 5 years ago

My problem is solved now with using the absolute path for the pictures. Thanks a lot.

How to ensure that word uses the absolute path instead of the relative path:

Use a different drive for editing the document, edit and save it. Then copy it back to the original drive without editing again.

chrisn7 5 years ago

Hi Wordnut

I posted about 2 months ago, and now have time to come back to this. We are now using Word 2007, but the document was created as a .doc and is still saved as that. I feel I have followed all the steps, with correct spaces, double backslashes, use of Ctrl+A,F9 on the merged document-in fact everything goes well-except that like others above, the signature/image doesn't change. Using Alt+F9 shows a diffent image being requested-I'm still in the same position!

wordnut profile image

wordnut 5 years ago from Californiaaah Author

@chrisn7 I'm at a loss, don't know what else could be wrong. Oh no, my super powers have failed me! Anybody want to jump in here?

To debug this, I'd just use the free tryout version of the addin referenced near the end of the article. If it doesn't work either, then your copy of Word is messed up and you should use the Repair option of Word's setup program. If it does work, then IncludePicture works fine and it's back to the 'ol drawing board...

chrisn7 5 years ago

I solved this at last! I originally postioned the signatures inside a fixed size text box, in separate documents, formatted to show no lines, so that different sized signature images would not move text further down the page-just forgot all about the hidden text box...just got to get all the images the same size now....Thank you for your patience.

Chris Newman 5 years ago

Hi all,

I have the merge filed working, however this will not automatically update when I send the document to a printer. I can alt-f9 on each image to pull it in. But I am merging hundreds of documents, is there a word setting that can tell the printer to essentially perform the alt-f9 command?

Secondly do I need to do anything with Citrix settings to perform this alt-f9 task when printing over Citrix?

Thanks in advance

wordnut profile image

wordnut 5 years ago from Californiaaah Author

@Chris Newman Please see original article, under the subhead Is IncludePicture For You? There's no way to merge images straight to the printer. The only way I know of to merge straight to the printer or email is to use an addin.

I don't use Citrix, have no advice to offer there.

5 years ago

May I clear my doubts that the database to be mail merge should be in excel format? And I should have a column for the pictures to be merged?

I am new to this. Thanks

wordnut profile image

wordnut 5 years ago from Californiaaah Author

@J It's OK to use an Excel spreadsheet as your merge database. Adding a spreadsheet column containing the image filename to merge should work fine.

Michael 5 years ago

I'm using Microsoft Office 2007 SP2 (Word) in Windows 7. Following the instructions in, I set up an includepicture command: {INCLUDEPICTURE {MERGEFIELD Maiden_name_actual}_{MERGEFIELD First_name_actual}.jpg" \* MERGEFORMAT \d} which updates the picture later when I use ctrl-A, F9. However, when I save the Word document, reboot, and reopen the document, ctrl-A, F9 doesn't update the picture anymore.

wordnut profile image

wordnut 5 years ago from Californiaaah Author

@Michael Sounds like you saved as a .docx. See Step 2.

Michael 5 years ago

No, I saved the file when I first created it as a .doc.

wordnut profile image

wordnut 5 years ago from Californiaaah Author

@Micheal Do Alt-F9 to make sure the fields are still there, intact.

Michael 5 years ago

The fields are all okay after Alt-F9 and back. They just don't update. Maybe it's a Word security problem. I can't find any Word option that controls includepicture, though. I saw another site mentioning a registry fix somewhat related to this problem but it only went up through Office 10 and I'm using Office 12.

wordnut profile image

wordnut 5 years ago from Californiaaah Author

@Micheal Wait a minute... you mean you're merging to a new document, then expecting the new document to update later? That's not the way it works. If you need to update later, just rerun the original merge.

Let's say your template is { IncludePicture "{ MergeField LAST }.jpg" \d }. After you do the merge, the merged-to document will contain a page with something like { IncludePicture "Jones.jpg" }. Notice that Word's merge process replaced the MergeField with the database's contents in the merged-to document. Doing Ctrl-A, F9 will update that example to load the image Jones.jpg, but any further updates will simply reload Jones.jpg with no change. No matter what changes you make to your database, the new merged-to document had its MergeField replaced with the hard-coded "Jones," so you'll see no further change.

Michael 5 years ago

No, I'm merging the same document.

In trying things out again, I've discovered that if I open the .doc file, do a Save As in Word 97-2003 Document format, then do the merge, it updates okay. This means that the Microsoft Word 2007 bug mentioned in step 2 above is complicated. The extra Save As is more work but it gets around my problem.

Nguyễn Nam 5 years ago

Many thanks for great tutorial, I had struggle with this problem before, but now it is done. Many thanks for WordNut. I hope you will have more useful tutorial for us.

Best regards

Peter 5 years ago


it doesn't work with svg-Files. Have you got a solution for this issue?

Thanks in advance :)

wordnut profile image

wordnut 5 years ago from Californiaaah Author

@Peter See the last 2 paragraphs of the article.

carolinemoon profile image

carolinemoon 5 years ago

Well written wordnut. Very useful hub!

Arrhg 5 years ago

No joke, this worked last week and now doesn't work. I've restarted, closed, danced a ditty. I'm only getting the red box instead of the image. Oh Microsoft, why?

Hong 5 years ago

That is awesome!! you my friend are a genius!

unuwot 5 years ago

this is great and will be so usefull when it works. I am trying to include three signatures all saved in the same folder. When I run the merge the same signature is used in each document. Then when I select all and F9, all the images go to the red X. Any ideas?

Many thanks

Tina Hilton 5 years ago

I've been trying to do this for a couple of years with no luck. This finally worked, with a caveat. I could only make it work if the pictures were saved to another drive. I even tried putting them right on the C drive and it still didn't work. I would only get the little red X box after the ctrl-A and F9. But I'm happy enough with this workaround. Thanks for putting this information out there.

paleolith 4 years ago

Just a comment which might help someone.

Sometimes MS Word 2002 insists on storing a relative path with slashes, rather than an absolute path with double backslashes. I haven't figured out why, but it did this to me.

The first time I followed this procedure, it worked. I went back to change some formatting, and it didn't work, didn't update the images, I even tried several times, created new documents, etc. I started investigating and noticed the relative path being stored. I spent a couple of hours trying to make it store the absolute path. I tried the suggestions from some comments here about changing web options. I tried saving the merged document to see if an unsaved document with the relative paths was the problem. Finally I tried yet again with a new document, for the umpteenth time, let it store the relative path, and now it's working fine.

I'm not sure exactly what happened when it failed, but probably I got one of the steps wrong. I've been using Mail Merge for at least 15 years, so I understand the procedure -- and I understand how easy it is to get one little thing wrong and have nothing work. So probably it failed due to something I did, and then I noticed the relative path and got sidetracked on that rather than just trying again the straightforward way.

So what I take from this is: if you do insert/picture/from file/link to file, and MS Word inserts a relative path with plain slashes, let it be. I don't know why or when it does that, but that's not the problem.

Thanks for posting this and maintaining it!


Richard 4 years ago

Thank you, thank you, thank you. This walk through had the 'missing piece' that was the key from he to get this feature to work.

Morgan 4 years ago

What about if you want to paste an image from a website into WORD 2010 edition?

Lightning007 4 years ago

Have you any idea how to include a picture into a document that has the file path in a bookmark. We have a CRM system that passes information into bookmarks in a document, so then I want the document to use the file path specidied in the bookmark to load the picture. I have tried using {Ref F157} in the includepicture fieldcode in many different ways but it doesn't seem to work. Any ideas. Thankyou

wordnut profile image

wordnut 4 years ago from Californiaaah Author

@Lightning007 Yup, referencing bookmarks inside an IncludePicture can be pretty hit & miss. I've had uneven success trying to do that, so I avoid it. Doesn't sound like you have the option to avoid the task, so all I can say is that the addin I mentioned in the last paragraph of the original article (wow, 85 comments, you really have to scroll!) under "Alternatives If..." works reliably with bookmarks.

jt 4 years ago

I have very carefully followed all the steps listed above. I tried putting the entire path in the excel column, and just the logo name. When I Insert picture, it doesn't pull in the entire path C:\\... it just shows that last folder it is in. I can't get this to work. I am using a .doc instead of .docx as advised. No matter what I try, I cannot get the logo at the top to change. It stays the same as the one I chose originally. When I click one of the pages that should have a different logo, and do ALT+F9, it shows that the name.jpeg is changing, but the actual logo doesn't change...and I didn't forget to do step 10! Help!!

jt 4 years ago

I can't get the picture to change. All the letters have the same picture on them. { INCLUDEPICTURE "T:\\Logo\\{ MERGEFIELD "Image" }.jpg" \* MERGEFORMAT \d } Logo is the name of the folder in the T drive where the different jpeg images are located. Image is the merge field in my excel data source containing the name of the logo I want to use for each entry. Even after doing Step 10, it still remains the same jpg I chose at the beginning. However, the name of the jpg changes to what it's supposed to be, it just doesn't update the picture. This is a .doc What am I doing wrong??

wordnut profile image

wordnut 4 years ago from Californiaaah Author

@jt I'm assuming you've merged to a new document (Edit Invividual Documents) and are doing Ctrl-A, F9 in the new document. The behavior you're experiencing tells me either the Ctrl-A or the F9 aren't working. Try individually selecting an incorrect image by clicking on it, then hitting F9. Any change? If so, you'll need to figure out why Ctrl-A isn't selecting all images for you. Otherwise, if F9 isn't working, the only possible cause I know of is fancy keyboards that assign another meaning to the F-keys unless you put them in F-Lock mode.

jt 4 years ago

You were right-I selecting one of the incorrect images and hit F9. It changed to the correct image. Any thoughts on why the Ctrl-A isn't selecting all images??

jt 4 years ago

Nevermind, I got it to work! Thanks for all your help!!

hr 4 years ago

I keep getting the same issue as JT. the merged document shows different jpg files as listed in my excel source, but alt F9 (or as on my laptop Fn alt F9) doesn't do anything and i still get the same first image showing each time. Please help!!

wordnut profile image

wordnut 4 years ago from Californiaaah Author

@jt Say, jt, could you pls share your solution? Seems that hr could benefit from your experience.

Lightning007 4 years ago

Thanks Wordnut I appreciate your guidance on the issue of using insertpicture with a URL from a bookmark. Sounds like I need the add-in but I am worried about the logistics of installing it on every PC in the place (about 500). Its too bad that MS does not put the functionality into Word. I could use VB but the bookmarks load after the auto-open event. Do you know of a way that a bookmark being loaded/populated could trigger an event to start a VB macro. I am sure I could load the image from a url stored in a bookmark using some VB if I tried hard. ??

wordnut profile image

wordnut 4 years ago from Californiaaah Author

@Lightning007 I don't have any joy for you. Fancy VB programming is way beyond the scope of this humble 101-level Hub. I'm trying to keep it G rated! In any event, Word's events are oriented toward major things like loading/saving, and are not really designed for advising you of "mere" changes to a document's contents or formatting.

TomRedox 4 years ago

Incredibly useful, thank you very much for posting it.

A note to fellow developers: This works fine for from code to. Use the instructions to create the merge field and then just merge the picture name, or you can also merge in the whole file path (remembering to double slash the paths as per the instructions and delete the root path that was previously left in).

paleolith 4 years ago

So frustrating. Just spent another 45 minutes with the same document I posted about a couple of months ago. It worked then, I re-opened it, it didn't work (no images after merge). Played around with re-inserting, using full path, etc. Finally did Save As to the same folder and it works. Then re-opened the original doc and it works. My tentative conclusion is that Word forgets where it's supposed to be looking for the images and needs to be prodded. I just wish I could figure out exactly how and where I'm prodding it.


paleolith 4 years ago

I just did it again, and again Word did not find the photos -- and again, Save As into the same folder revived it. So I'm continuing to go with my hypothesis that Word forgets the path to the images folder, and that Save As resets it. This might be related to the images folder being in the same folder as the Word file, but I haven't tried any variations on that.

Jo 4 years ago

I can get the signatures into my mail merge, but when I re-open the document the signatures have disappeared, any ideas why this happens?

paleolith 4 years ago

Jo, see my comment just above yours -- try Save As on the document, either into the same folder or into the signatures folder (if different). I don't know whether you have the same problem I did, but it's worth a try.

Astrid 4 years ago

I had the problem that after merging the document there was still the same picture in every record. No matter how often I did the CTRL+A and F9-thing.

Then I saved the merged document. Closed it. Reopened it. CTRL+A nd F9. Big fat grin on my face. There are all my beautyful pictures.

I wouldn't have made it without this article. Thanks.

Rudy 4 years ago

Thx alot very very ..... helpful ...... GBU

Preethi Soundararajan 4 years ago

This was very useful. Thanks a ton for posting this! I followed the instructions to the minute detail, and 'it worked'!! Wish I could have resized the images through mail merge, though. I went in and resized it in the 'new document' after the mail merge. Worked only after I saved the doc in Word 97-2003 format.

Larry M 3 years ago

Super! I'm very comfortable with both Merge and VBA. I was about to spend a couple of hours writing a VBA macro to do this. Now I can do it without the design effort. Thanks!!

BR 3 years ago

Hi, does this work for Labels too please? I could do it for letters but not for labels

BR 3 years ago

Hi... it worked on labels too :-) Thank you very much.... GBU

Jarrell 3 years ago

Hi, does this work on word 2010? I tried the steps mentioned above and didn't managed to get different image for each person. My database is in excel 2010 and so i link it to there. Am i doing it right?

Jarrell 3 years ago

{ INCLUDEPICTURE "Images/cupcakes1.jpg" \ * MERGEFORMAT \D }

I realised mine code appear this way after i insert picture and click link to file. Could this be the reason why i am getting the same images instead of different images? Can anyone help me? What should i do to make it work? My images are save in a test folder on my desktop.

Thanks in advance.

wordnut profile image

wordnut 3 years ago from Californiaaah Author

@Jarrell Yes, Word 2010 & 2013 work fine, but make absolutely sure you did Step 2. Looking at the code you show, I don't know if it's a transcription error, but 1) did you do step 10?, 2) there should be no space between \ and *, 3) use double backslashes to separate folder names, not single forward slashes, and 4) I don't recommend using relative paths since they create lots of confusion; stick with absolute paths, e.g. c:\\folder\\images\\cupcakes.jpg

Jarrell 3 years ago

Hi thanks for your reply. I managed to figure it out yesterday and now my coding look like this. I used the IF TRUE to help me with it.

{ INCLUDEPICTURE “{ IF TRUE “D:\\Users\\s42701\\Desktop\\Test\\Images\\ { MERGEFIELD SName }.jpg”}”\*MERGEFORMAT\D }

i did followed all your steps and my code just appeared as relative paths previously and with single forward slashes. I have no idea why too.

Anyway now that it is working, i am really great. But I am still gonna figure out why my code was as such previously when I follow your step by step tutorial.

Thanks ;)

Jarrell 3 years ago

Okay, i figured it out already. I cannot save the document right at the beginning. I can only save the document after i have inserted the images at step 4. Only then will i able to have abolsute path which make everything work well. I do not know why but it will only just work this way. anyway thanks for the great tutorial =D

Toby 3 years ago

Thanks for publishing this article! Really useful information. We are going to use this method to print ID cards for 200+ staff. Also well done for providing ongoing technical support to the whole world! Microsoft should put you on their payroll.

crawga 3 years ago

Hi, i'm trying to create labels with the includepicture procedure. I'm using word 2004 for mac. I can't understand where is the mistake. I followed all the steps, controlled the writing. but when I merge to a new document, it appears only the first image I insert. I know that cntrl+a is comm+9 in Mac system, but what about F9. is F9 the same on Mac? when I click it, the image disappears and turn into a sign of a picture. can you help me?

the code appears like this { INCLUDEPICTURE "Macintosh HD:\\...\\...\\images\\{ MERGEFIELD Title }.jpg"\*MERGEFORMAT \d} in the first label but in the other one is written only {NEXT}. is it correct?

crawga 3 years ago

I got it...but I see only a picture, the first I use in step 4 when I insert the file, even if going under edit-links, all the other images seem to be linked. What's wrong?

wordnut profile image

wordnut 3 years ago from Californiaaah Author

@crawga this seems like a Mac issue. I'm a Windows guy. Can anybody else jump in?

jm3 3 years ago

Thank you for this, others I found did not work. I am making name tags, using labels and am working to include a photo of the person next to their name. The first label is perfect. It includes photo and name. All others only include the name. How do I get the photo to appear on all the other labels? Do I have to repeat the steps or copy paste? I am also having the problem of the photo disappearing after I "finish and merge" to new document, the photo no longer shows. I tried saving as but it didn't work. Lastly, on the tool bar is an option to "update labels" but it is shaded, indicating that it is not usable. How can I use this button? I tried selecting all but that didn't change anything. Thanks!

akak2 3 years ago

Ah-ha! Save As INTO THE FOLDER WHERE THE PHOTOS ARE STORED! Thank you, thank you, thank you to whoever was the first to suggest that as a way of getting the photos to display. I'm using Windows 7/Word 2010 and drove myself bonkers following all of the steps to a "T" only to come up with many of above-mentioned scenarios (same photo on each page; the includepicture merge string with proper data but no photo; red x in box/no photo, etc.). That last step helped (in my case anyway) the saved file know where to look. Kinda makes sense now when I look at the abbreviated network path string...

Karen Pardue 3 years ago

This process worked perfectly for me. Please hang in there folks and follow the steps and hints to the letter. The key is here, if you are 2010, save backwards to 2007. After I hit the step of merge to new document, I saw all the same pictures too. Until I followed the step to Control +A. and Then hit F9. Once I saved the file with a new name and saved it as a 2007 file, all the pictures showed up as they should have.

This took me an hour or so to complete as I was not following instructions as they were specifically given.

YY 3 years ago

Your post has been a wonderful solution for a task in my office. I have built a template using this technique for a few months and colleagues have adopted well. Unfortunately, after a forced Windows Vista update required by the IT department, it no longer works and a blank rectangle is shown instead of the digital signature image (in *.tif) despite there is no change in any coding or file path. Do you happen to have any idea how to fix this? Thanks a millions!

wordnut profile image

wordnut 3 years ago from Californiaaah Author

@YY See step #2.

rAjA Aftab 3 years ago

PLZ HELP SIR I save MS-word in 2003 but i am tried to merge pictures using that code plz help me

my computer path for pictures


{ INCLUDEPICTURE "d:\\pics\\1.jpg{ MERGEFIELD "pics" }.jpg" \* MERGEFORMAT \d }

wordnut profile image

wordnut 3 years ago from Californiaaah Author

@rAjA try { INCLUDEPICTURE "d:\\pics\\{ MERGEFIELD "pics" }.jpg" \* MERGEFORMAT \d }

MADAN KUMAR 3 years ago


wordnut profile image

wordnut 3 years ago from Californiaaah Author

@MADAN As many of the people posting on here have mentioned, the instructions do work as long as you follow them TO THE LETTER. Failing that, check out some of the commercial resources mentioned at the end of the article.

rAjA 3 years ago

My Sweet bro. really thnks for your cooperation but sir your sending

{ INCLUDEPICTURE "d:\\pics\\{ MERGEFIELD "pics" }.jpg" \* MERGEFORMAT \d }

command i write same as is tis but finally result zero. no any pic displayed. if you sending me you Email ID is sended you the mail plz you check you self ......

wordnut profile image

wordnut 3 years ago from Californiaaah Author

@rAjA I just can't offer individual support to the 85,000 people who visit this page. The instructions do work when followed to the letter, and countless people posting here seem to agree. In particular, refer to poster Karen (6 or 7 items above this one) who said "This took me an hour or so to complete as I was not following instructions as they were specifically given."

As the article says, IncludePicture is a demanding and delicate thing. If you're having trouble with this do-it-yourself method, you may be happier checking out the commercial resources mentioned at the end of the original article.


Thanks for your Instruction but I use a Mac computer and when I hit alt +9 nothing happens. PLEASE CAN YOU LET ME what to do

wordnut profile image

wordnut 3 years ago from Californiaaah Author

@BOBBY I take it you don't run Parallels. Can a Mac person jump in here? I'm just a PC.

Junior Jr 2 years ago

Congratulations! It´s a great article.

As you said: "Don't bother reporting the bug to Microsoft; they've known about it for a long time."

So, I am using the Publisher to mail merge graphics and photos.

Thank you very much!

akak2 2 years ago

@BOBBY'S PHOTOGRAPHY: Did you try Option + F9?

akak2 2 years ago

@rAjA I often get the same thing when I first merge the doc (no photos initially) and it is only after I save the doc to the same folder where the photos reside, then wait patiently (oftentimes I have perhaps 50 individuals pages with both merged data AND a photo on each page) for everything to sync. The last time I did a merge, I actually had to run it a few times before it took -- I'm not sure why; it was almost like it needed a little kick, but it did work. As I have stated before, however, saving the document into the folder where the photos reside seems to be key for me. Printing the final to pdf will secure the photos in case you want to email these to someone else or just make sure the photos stay within the pages.

PS Have a said "thank you" ever @wordnut for this contribution? We employ this process for our Police Academy facesheets (this is a perm record of each recruit's performance, including their photo, while in the Academy) -- each of these used to be hand-typed with a photo glued to the sheet. Now -- all digital! Very nice...

Mike 2 years ago

Hi Wordnut,

My images are on our network in the 5th sub directory level as below.

“\\\\Sidmags\\images-ro\\product\\37\\5552\\37555206.jpg” (this is the path I get when I link to an image from that directory.

The first 3 levels will never change (\\\\Sidmags\\images-ro\\product)

The rest is the department (37), sub-departement (5552) and SKU (37555206.jpg), these values will always change.

Here is my link:

{ INCLUDEPICTURE "\\\\Sidmags\\images-ro\\product\\37\\5552\\37555206.jpg" \* MERGEFORMAT \d }

If I just change the last digit before .jpg manually, say change the 6 for a 7, it works and updates my image to that item. So that works fine.

In my database, I created a field I called “Fichier_image2” that concatenates the part that changes (37\\5552\\37555206).

My problem is when I try to link dynamically like this : { INCLUDEPICTURE "\\\\Sidmags\\images-ro\\product\\{mergefield “fichier_image2”}.jpg" \* MERGEFORMAT \d }

The result of that dynamic value is the exact same as:

“\\\\Sidmags\\images-ro\\product\\37\\5552\\37555206.jpg” used above.

That’s when it no longer works, all I see is an empty frame with the infamous red X. What am I missing ? I feel I respected all the points noted in this thread however. Would there be a problem going through so many sub-directories ?.

This being a corporate network, there is no way I can copy my document in those directories to be in the same folder.

Thanks for any hints you might provide.

wordnut profile image

wordnut 2 years ago from Californiaaah Author

@Mike: You're doing Ctrl-A, F9, right? Otherwise looks reasonable. Even very simple UNC paths have sometimes been known to cause now-you-see-it-now-you-don't-type issues when merging variable Word fields.

Albert 20 months ago

Good Work .... Nice Article

Kevin E Pyle profile image

Kevin E Pyle 10 months ago

Just tried using your instructions on a .doc file in Word 10. Pressing ALT-F9 shows the {MAIL MERGE} codes but the jpg. picture does nothing. Am I missing something?

wordnut profile image

wordnut 10 months ago from Californiaaah Author

@Kevin I just can't offer individual support to the 128,000 people who've visited this page to date. You may find other people's comments above useful.

The instructions do work when followed to the letter, and countless people posting here seem to agree. In particular, refer to poster Karen (15 - 20 items above this one) who said "This took me an hour or so to complete as I was not following instructions as they were specifically given."

As the article says, IncludePicture is a demanding and delicate thing. If you're having trouble with this do-it-yourself method, you may be happier checking out the commercial resources mentioned at the end of the original article.

    Sign in or sign up and post using a HubPages Network account.

    0 of 8192 characters used
    Post Comment

    No HTML is allowed in comments, but URLs will be hyperlinked. Comments are not for promoting your articles or other sites.

    Click to Rate This Article