Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 05-19-2016, 01:39 PM
smitty777 smitty777 is offline Mailmerge - when some records have photos, and some without Windows 7 32bit Mailmerge - when some records have photos, and some without Office 2007
Novice
Mailmerge - when some records have photos, and some without
 
Join Date: May 2016
Posts: 2
smitty777 is on a distinguished road
Default 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!!
Reply With Quote
  #2  
Old 05-19-2016, 06:04 PM
macropod's Avatar
macropod macropod is offline Mailmerge - when some records have photos, and some without Windows 7 64bit Mailmerge - when some records have photos, and some without Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,962
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

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]
Reply With Quote
  #3  
Old 05-20-2016, 06:16 AM
smitty777 smitty777 is offline Mailmerge - when some records have photos, and some without Windows 7 32bit Mailmerge - when some records have photos, and some without Office 2007
Novice
Mailmerge - when some records have photos, and some without
 
Join Date: May 2016
Posts: 2
smitty777 is on a distinguished road
Default

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?
Reply With Quote
  #4  
Old 05-20-2016, 08:30 PM
macropod's Avatar
macropod macropod is offline Mailmerge - when some records have photos, and some without Windows 7 64bit Mailmerge - when some records have photos, and some without Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,962
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

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]
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Mailmerge - when some records have photos, and some without Missing records after word mailmerge matthewchin Mail Merge 18 12-11-2015 12:06 AM
Mailmerge - when some records have photos, and some without 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 - when some records have photos, and some without Mailmerge to Email with a mailmerge attachment Baldeagle Mail Merge 8 02-11-2013 04:40 AM
Mailmerge - when some records have photos, and some without 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

Other Forums: Access Forums

All times are GMT -7. The time now is 04:53 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft