FORUMS

c360 Forums
 Home        Members    Calendar    Who's On

Welcome Guest ( Login | Register )
      



using if...then...else with picturesExpand / Collapse
Message
Posted 5/16/2007 10:00:10 AMPost #1476
 

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie
I'm creating a booklet, on each page is a person's contact info, bio, and for some, but not all, a photo. I am merging all the data from excel; for the photos, there is an excel field called Photo with the name of each photo and I'm using the IncludePicture command to merge these. What I want is for Word to insert a photo when the Photo field has info in it and NOT insert a photo when that field is blank. I've tried to nest the IncludePicture inside an if...then..else statement but it's not working for me. Here's how I have it below. Any thoughts how to make it work??

{IF {MERGEFIELD Photo}<>"" {IncludePicture "C:\\PhotoFolder\\{MERGEFIELD Photo}"\d}" ""}
Posted 5/21/2007 2:02:44 PMPost #1491
 

Forum MemberForum MemberForum MemberForum MemberForum MemberForum MemberForum MemberForum Member
I searched the internet on "conditional fields in word merge", and found some articles.  Your syntax differs from the example presented in a Microsoft KB which is...

{ IF { = OR ( { COMPARE { MERGEFIELD Field_1 } <= "Value" }, { COMPARE { MERGEFIELD Field_2 } >= "Value" } ) } = 1 "True Instructions" "False Instructions" }

See http://support.microsoft.com/kb/211363



Ken Champion
c360 Technical Support Manager
Posted 5/22/2007 3:04:16 PMPost #1492
 

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie
Thanks for that. I found another way too that seems to work.
Posted 5/23/2007 9:09:07 PMPost #1496
 

Forum MemberForum MemberForum MemberForum MemberForum MemberForum MemberForum MemberForum Member
Glad to hear it.  Would you mind posting it for others?

Ken Champion
c360 Technical Support Manager
Posted 5/25/2007 11:28:32 AMPost #1508
 

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie
This page is pretty useful and helped me.

http://www.gmayor.com/formatting_word_fields.htm#image
« Prev Topic | Next Topic »


Reading This TopicExpand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: kanika.jackson, Ken Champion

PermissionsExpand / Collapse

All times are GMT -5:00, Time now is 10:13am

Powered by InstantForum.NET v4.1.4 © 2009
Execution: 0.141. 10 queries. Compression Enabled.