MS Office Forum / Word / Mailmerge and Fax / June 2007
Merging pictures along with data...
|
|
Thread rating:  |
Evan Lapka - 21 Jun 2007 14:13 GMT I'm currently working on a database of employees for my supervisor. I'm making individual profiles of employees by using the mail-merge feature in Microsoft word to take the data from the spreadsheet and filter it into word documents. This part is going wonderfully... BUT, my supervisor told me today that he wants ID pictures included with each profile. Is there a way for me to insert a picture into a cell on the spreadsheet so that mail merge will automatically sort the pictures to the correct files along with the rest of the data? Any input would be greatly appreciated, thanks!
Peter Jamieson - 21 Jun 2007 14:50 GMT Put the the full pathname of the ID picture in a cell in Excel (you may also have to double up any backslashes in the name, or use single forward slashes, e.g.
c:\\my id pictures\\xyz.jpg or c:/my id pictures/xyz.jpg
Let's suppose you put the filenames in a column called IDPicture.
Then use the following nested field in Word:
{ INCLUDEPICTURE "{ MERGEFIELD IDPicture }" \d }
(both pairs of {} have to be the special field codes you can insert using ctrl-F9)
Alternatively, if all the pictures are in the same folder, say c:\my id pictures, thenyou can put just the file name "xyz.jpg" in the IDPicture column and use
{ INCLUDEPICTURE "c:\\my id pictures\\{ MERGEFIELD IDPicture }" \d }
(Make sure there are no spaces that shouldn't be there).
Then merge to a new document, ctrl-A to select it, and press F9 to update the fields to see the different pictures.
Peter Jamieson
> I'm currently working on a database of employees for my supervisor. I'm > making individual profiles of employees by using the mail-merge feature in [quoted text clipped - 8 lines] > of > the data? Any input would be greatly appreciated, thanks! Evan Lapka - 22 Jun 2007 14:50 GMT perhaps I'm not doing something right, but after I enter in { INCLUDEPICTURE "c:\\my id pictures\\{ MERGEFIELD IDPicture }" \d } with the modified file parameters, etc... the text just disappears and no image is present.
> Put the the full pathname of the ID picture in a cell in Excel (you may also > have to double up any backslashes in the name, or use single forward [quoted text clipped - 38 lines] > > of > > the data? Any input would be greatly appreciated, thanks! Peter Jamieson - 22 Jun 2007 15:06 GMT While previewing the mail merge main document, use Alt-F9 to view the field codes, then select { MERGEFIELD IDPicture }, right-click and select the Toggle field code option. You should now see the complete file path name. Apart from the doubled-up backslashes, is it /exactly/ the same as the actual full path name of one of your images? (No extra spaces at the beginning or end or around the file name, for example)
Peter Jamieson
> perhaps I'm not doing something right, but after I enter in > { INCLUDEPICTURE "c:\\my id pictures\\{ MERGEFIELD IDPicture }" \d } with [quoted text clipped - 49 lines] >> > of >> > the data? Any input would be greatly appreciated, thanks! Evan Lapka - 22 Jun 2007 16:53 GMT It now reads "{ INCLUDEPICTURE "Pictures/%7b%20MERGEFIELD%20IDPicture%20%7d" \* MERGEFORMAT \d }" which is not what I initially entered.
> While previewing the mail merge main document, use Alt-F9 to view the field > codes, then select { MERGEFIELD IDPicture }, right-click and select the [quoted text clipped - 57 lines] > >> > of > >> > the data? Any input would be greatly appreciated, thanks! Peter Jamieson - 22 Jun 2007 17:28 GMT OK,
1. you also need to uncheck Word Tools|Options|General|Web options|Files|"Update links on save" and try again.(Even though what you are doing has nothing to do with the Web)
2. You need to ensure that the { MERGEFIELD IDPciture } is a /field/ - use ctrl-F9 to insert the special field code braces - typing them from the keyboard doesn't work.
Peter Jamieson
> It now reads "{ INCLUDEPICTURE > "Pictures/%7b%20MERGEFIELD%20IDPicture%20%7d" [quoted text clipped - 74 lines] >> >> > of >> >> > the data? Any input would be greatly appreciated, thanks! Evan Lapka - 22 Jun 2007 18:27 GMT Alrighty, I did what you said for number 1, and now the text is actually appearing where it should, my only issue now is that instead of the picture appearing in the space, only the file name is appearing.
> OK, > [quoted text clipped - 85 lines] > >> >> > of > >> >> > the data? Any input would be greatly appreciated, thanks! Peter Jamieson - 22 Jun 2007 18:44 GMT OK, so when you Alt-F9 to display the "field results" you see something like
c:\\my id pictures\\mypicture.jpg
Or what?
You are welcome to despam my e-mail address (remove "KillmapS") and send me copies of your document !
Peter Jamieson
> Alrighty, I did what you said for number 1, and now the text is actually > appearing where it should, my only issue now is that instead of the [quoted text clipped - 102 lines] >> >> >> > of >> >> >> > the data? Any input would be greatly appreciated, thanks! Evan Lapka - 22 Jun 2007 18:57 GMT the word document has this in the space: { MERGEFIELD IDPicture} And in the corresponding excel cell: 265332.jpg
> OK, so when you Alt-F9 to display the "field results" you see something like > [quoted text clipped - 113 lines] > >> >> >> > of > >> >> >> > the data? Any input would be greatly appreciated, thanks! Peter Jamieson - 22 Jun 2007 19:12 GMT From what you say, I can only make guesses. I think you have not constructed the fields the way that they need to be. Let's start with three ideas: 1. this works for lots of people but... 2. it is not yet working for you so... 3. the problem is likely to be something really simple
Let's try to go step-by-step...
<<
> the word document has this in the space: { MERGEFIELD IDPicture} Let's start with your field: a. in Word, you see { MERGEFIELD IDPicture } b. what do you see if you press Alt-F9? Do you see: "265332.jpg" ? (But without the double-quote marks?)
Which folder contains the file
265332.jpg
?
Peter Jamieson
> the word document has this in the space: { MERGEFIELD IDPicture} > And in the corresponding excel cell: 265332.jpg [quoted text clipped - 136 lines] >> >> >> >> > of >> >> >> >> > the data? Any input would be greatly appreciated, thanks! Evan Lapka - 22 Jun 2007 19:46 GMT when ALT-F9 is pressed, { MERGEFIELD IDPicture } appears, when ALT-F9 is pressed again, 265332.jpg" (without the quotation marks) appears along with the other desired information in other fields i.e. Name, Address, etc... { MERGEFIELD IDPicture } is set up as a field.
> From what you say, I can only make guesses. I think you have not constructed > the fields the way that they need to be. Let's start with three ideas: [quoted text clipped - 160 lines] > >> >> >> >> > of > >> >> >> >> > the data? Any input would be greatly appreciated, thanks! Evan Lapka - 22 Jun 2007 19:50 GMT the picture is located in: d:\\Documents and Settings\\LAPKAEM\\My Documents\\CDD Students\\Pictures\\
> when ALT-F9 is pressed, { MERGEFIELD IDPicture } appears, when ALT-F9 is > pressed again, 265332.jpg" (without the quotation marks) appears along with [quoted text clipped - 166 lines] > > >> >> >> >> > of > > >> >> >> >> > the data? Any input would be greatly appreciated, thanks! Peter Jamieson - 22 Jun 2007 20:03 GMT Then are you using
{ INCLUDEPICTURE "d:\\Documents and Settings\\LAPKAEM\\My Documents\\CDD Students\\Pictures\\{ MERGEFIELD IDPicture }" }
?
Peter Jamieson
> the picture is located in: > d:\\Documents and Settings\\LAPKAEM\\My Documents\\CDD [quoted text clipped - 195 lines] >> > >> >> >> >> > of >> > >> >> >> >> > the data? Any input would be greatly appreciated, thanks!
|
|
|