![]() |
#1
|
|||
|
|||
![]()
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}} Note: The field brace pairs (i.e. '{ }') for the above example are all created in the document itself, via Ctrl-F9 (Cmd-F9 on a Mac or, if you’re using a laptop, you might need to use Ctrl-Fn-F9); you can't simply type them or copy & paste them from this message. Nor is it practical to add them via any of the standard Word dialogues. The spaces represented in the field constructions are all required.
__________________
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
|
||||
|
||||
![]()
Did you do as per the Note in my previous post?
Assuming you've done that correctly, 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] |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
matthewchin | Mail Merge | 18 | 12-11-2015 12:06 AM |
![]() |
Merlot | Mail Merge | 2 | 12-07-2015 10:13 AM |
![]() |
Baldeagle | Mail Merge | 8 | 02-11-2013 04:40 AM |
![]() |
Baldeagle | Mail Merge | 13 | 05-29-2012 02:04 PM |
Inserting photos | casatropical | Word | 1 | 01-18-2012 10:30 AM |