Only get a red x after merging pictures

Anonymous
2010-04-14T02:24:00+00:00

My data source is an xlsx file and one field (PictureLocation) has the full path name of each jpg file I want to merge into a document.  I use this merge function:  {INCLUDEPICTURE "MERGEFIELD PictureLocation}"} which works fine except I only get a box with a small red x in upper left-hand corner where the picture should be.  I have tried F9, but to no avail.  What am I doing wrong or what have I set incorrectly?  I use VISTA and OFFICE 2007. dottybee

Microsoft 365 and Office | Word | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
Answer accepted by question author
Doug Robbins - MVP - Office Apps and Services 323.6K Reputation points MVP Volunteer Moderator
2010-04-14T05:38:23+00:00

What is in the PictureLocation field?

The filepath separators need to be duplicated \ or you need to use / as a separator.

Was this answer helpful?

0 comments No comments

55 additional answers

Sort by: Most helpful
  1. Suzanne S Barnhill 279.4K Reputation points MVP Volunteer Moderator
    2010-06-25T11:26:16+00:00

    Right. I didn't read all of your post, but you were suggesting putting the entire path in the data source. I see you did later suggest putting just the changeable part, which was my suggestion.

    I looked at Cindy's article and concluded that, if I didn't already know how to do this, I would not be able to figure it out from Cindy's instructions.

    Was this answer helpful?

    0 comments No comments
  2. Doug Robbins - MVP - Office Apps and Services 323.6K Reputation points MVP Volunteer Moderator
    2010-06-25T05:40:27+00:00

    The OP was trying to put the INCLUDEPICTURE field in the data source!

    Was this answer helpful?

    0 comments No comments
  3. Suzanne S Barnhill 279.4K Reputation points MVP Volunteer Moderator
    2010-06-24T22:35:42+00:00

    Although you could do it the way Doug suggests, what I described is what I

    do:

    1. In the mail merge data source, you have a column called "picture," and in it you put the smallest portion of the filename/path that is different. My assumption is that you have all the pictures in the same folder, and so the path will be the same for all of them except for the actual filename. In other words, you'll have a folder of pictures with paths such as:

    C:/Documents and Settings/ProfileName/My Documents/My

    Pictures/RésuméPhotos/Brown.jpg

    C:/Documents and Settings/ProfileName/My Documents/My

    Pictures/RésuméPhotos/Jones.jpg

    C:/Documents and Settings/ProfileName/My Documents/My

    Pictures/RésuméPhotos/Smith.jpg

    1. In order to get the path right in the mail merge main document, you insert any one of the pictures using the "Link to file" option. Where you select this will depend on what version of Word you're using, but doing so will ensure that you get an IncludePicture field that you can view. As noted it will be something like this:

    { INCLUDEPICTURE "C:\Documents and Settings\ProfileName\My Documents\My

    Pictures\RésuméPhotos\Jones.jpg" \d }.

    If you do it this way, you don't have to worry about the proper formatting for the field (backslashes, quotation marks, etc.). You let Word do the work for you.

    1. When you have inserted this field, what you'll SEE is the picture of Jones, but if you press Alt+F9, you'll see the field code. Select just the Jones part of it (again still assuming that the rest of the path would be the same for all the other photos and that the Jones part is what you have in the mail merge data source) and substitute a mergefield. So if the column where you've put Jones and Smith and Brown and so on is called Picture, then you'd have something like this:

    { INCLUDEPICTURE "C:\Documents and Settings\ProfileName\My Documents\My

    Pictures\RésuméPhotos\{ MERGEFIELD Picture }.jpg" \d }

    Note that, in order to see the IncludePicture field code, you must have the picture wrapping set to In Line With Text. If you want text wrapped around it, you can change the wrapping after you get the field working.

    Note that the \d switch in the IncludePicture field means that the pictures will not be embedded in the file (so your merged document would likely break if you moved it to a different machine. If you want the pictures embedded, you can remove the \d switch before merging (I think) or unlink the photos (with Ctrl+Shift+F9) after merging.

    Was this answer helpful?

    0 comments No comments
  4. Suzanne S Barnhill 279.4K Reputation points MVP Volunteer Moderator
    2010-06-24T22:35:41+00:00

    No, Doug, that is not what I suggested at all. It would work, of course, but I find it much easier to put the path in the mail merge main document and use the mergefield for just the filename. That way the mail merge data source is much less cluttered.

    Was this answer helpful?

    0 comments No comments