#1
|
|||
|
|||
Mail Merge with Pictures
Hi Paul,
I'm having exactly the same problem, but can't seem to find a way to PM you. I would just like to ask you some advice or guidance as to what I am doing wrong, but since this thread (https://www.msofficeforums.com/mail-...ut-images.html) has already been resolved, I don't want to spam it. Thanks in advance. - Dewald |
#2
|
||||
|
||||
Hi Dewald,
Without knowing what you're doing, I can't really offer any specific advice. As indicated in my last post, though, it would be useful to know what the actual filepath is and what the field referenced by mergefield concerned is named and what it returns.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#3
|
|||
|
|||
Quote:
I'm trying to do a mail merge from an Excel spreadsheet. Everything works great and I have 8 images on each page (Using labels and each one has an image) but every 3 pages or so, the image changes. The name of the image it has to use is stored in the Country column in Excel. On pressing Alt-F9, it shows the URL correctly (In the final document) but all the images are showing the first pages' images. Currently the images in the template have this code: Code:
{ INCLUDEPICTURE "JAPAN.png" \* MERGEFORMAT \d } - Dewald |
#4
|
||||
|
||||
Simply inserting a hard-coded INCLUDEPICTURE field into the document won't work. You need to use a field construction similar to the one I've already provided in post #2 above. Since you haven't provided the information requested, though, I can't give specific advice for your situation.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#5
|
|||
|
|||
Quote:
Sorry, just noticed that for some reason, copying the code and then pasting it gives the hardcoded version. Here's the actual one typed out: Code:
{ INCLUDEPICTURE "{ MERGEFIELD Country }.png" \* MERGEFORMAT \d } Thanks in advance. - Dewald |
#6
|
||||
|
||||
Again, as mentioned in post #2 at https://www.msofficeforums.com/mail-...ut-images.html:
Quote:
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#7
|
|||
|
|||
Quote:
Alright, so here are the files. I retried your solutions in the second post and it still doesn't work but I'm guessing I'm doing something wrong. Hopefull you'll be able to help. Really appreciate it, Paul! - Dewald Last edited by DewaldDeJager; 12-23-2013 at 01:14 AM. |
#8
|
||||
|
||||
Quote:
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#9
|
|||
|
|||
Quote:
Last edited by DewaldDeJager; 12-23-2013 at 01:14 AM. |
#10
|
||||
|
||||
The issue may be that the field code needs the path to work with the construction you're using. If you can be sure the pictures will always be in the same folder as the mailmerge main document, you can modify the field code by adding a FILENAME field thus:
{IF{INCLUDEPICTURE {IF TRUE "{FILENAME \p}\..\{MERGEFIELD Country}.png"} \d} {INCLUDEPICTURE {IF TRUE "{FILENAME \p}\..\{MERGEFIELD Country}.png"} \d}} The above works in my testing, though your workbook has some active but unused rows at the bottom and this causes an extra page of labels with no data to be generated.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#11
|
|||
|
|||
Hi Paul,
It works! Thanks for all the help. At first it was just giving blanks again but then I noticed I had to refresh my template and not the merged document. Thanks once again! - Dewald |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Mail merge pictures from Access to Word | Jolsen | Mail Merge | 7 | 11-22-2013 01:23 PM |
Mail Merge Duplication of address on merge | RICKY | Mail Merge | 1 | 09-26-2012 03:14 PM |
Templates, pictures, Mail Merge and Excel | kckay | Word VBA | 1 | 05-17-2012 08:51 PM |
Displaying contact pictures in e-mail header | christer | Office | 0 | 10-03-2011 09:40 AM |
Merge Fields, Pictures and output to email (with attachment) | schilds71 | Mail Merge | 0 | 10-21-2010 12:02 PM |