#1
|
|||
|
|||
Mailmerge - when some records have photos, and some without
I am creating a company directory. Some people in the directory have photos on file, some do not.
In my directory template I have the line { INCLUDEPICTURE { MERGEFIELD "Image_URL" } } where "Image_URL" is the column in my excel file that has links to profile photos. If no photo exists, the cell in this column in blank. I run the merge, and CTRL+A and F9 to refresh, and I can see the pictures for everyone who has them. (YAY!) BUT - for the people who don't have photos, I instead get "Error! Filename not specified." (BOO!) MY QUESTION: How to I suppress that error message? Or replace it with generic text of some sort? Thanks!! |
#2
|
||||
|
||||
You would need to use a field coded along the lines of:
{IF{MERGEFIELD "Image_URL"}<> "" {INCLUDEPICTURE {IF TRUE "{MERGEFIELD "Image_URL"}"} \d}}
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#3
|
|||
|
|||
Thank you for your reply Paul.
I've typed in { IF{ MERGEFIELD "Image_URL" }<> "" { INCLUDEPICTURE { IF TRUE "{ MERGEFIELD "Image_URL" }" }\d } } ran mail merge, CTRL+A, F9, and I get no pictures and no error message. Is there anything special about the "<>"? Or do I just type those in from the keyboard? |
#4
|
||||
|
||||
The main problem is that, since Word 2007 was released Word has lost the ability to detect that the image referred to in an INCLUDEPICTURE field is missing so as to be able to suppress the output. The simplest workaround is to have a dummy image (e.g. white, 1*1 pixel) that you can refer to in your data source when the images are missing.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Missing records after word mailmerge | matthewchin | Mail Merge | 18 | 12-11-2015 12:06 AM |
Trouble doing a Mailmerge in Word 2010 with multiple records for the same client | Merlot | Mail Merge | 2 | 12-07-2015 10:13 AM |
Mailmerge to Email with a mailmerge attachment | Baldeagle | Mail Merge | 8 | 02-11-2013 04:40 AM |
Mailmerge to Email with a mailmerge attachment | Baldeagle | Mail Merge | 13 | 05-29-2012 02:04 PM |
Inserting photos | casatropical | Word | 1 | 01-18-2012 10:30 AM |