View Single Post
  #3   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default conditional inclusion of pictures

I wouldn't bother trying to nest the fields. Simply include them one after
the next.

{ IF { Dropdown1 } = "Air France" "{ Includepicture "D:\\FAKE STUFF\\1 AWB
LOGOS\\Air France.jpg" }" }{ IF { Dropdown1 } = "Alitalia" "{ Includepicture
"D:\\FAKE STUFF\\1 AWB LOGOS\\Alitalia.jpg" }" }{ IF { Dropdown1 } =
"Emirates" "{ Includepicture "D:\\FAKE STUFF\\1 AWB
LOGOS\\Emirates.jpg" }" }

Nor do you need to 'update the fields'. Check the calculate on exit check
box of the dropdown field. When you tab out of the dropdown field the logo
field is updated.

Interestingly when I tested, the Air France logo wouldn't work here either.
The reason was I had a space between air and france in the filename but not
in the field. Check your spellings!

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org


Mercedes.K wrote:
Hi there...
I have created a form that has a dropdown list of airlines such as
AlItalia, Emirates, etc... and I've entered an IF / THEN string to
include the logo of the airline so that if Emirates is selected then
the Emirates logo appears, and so on and so forth.
I'm having a few issues though...
1) All the logos show, but one. For some reason when I "Update
Field" after selecting "Air France" the logo simply doesn't appear.
I get a blank. As far as I can see, the syntax is fine!
2) All the logos are saved at the same resolution of 200dpi and are
all approximately 3 inches wide and yet some show up at the right
size and others show up much smaller (about 1 inch wide)
3) Is there an easy way to have the "includepicture" field update
automatically? There are a number of users who will use this form
and even if I select to update fields in the options so that the form
prints properly, they're going to get confused when they don't see
the logo pop up.

Here's a shortened version of what I have...
{IF {Dropdown1} = "Air France" "{Includepicture "D:\\Fake Stuff\\1 AWB
Logos\\AirFrance.jpg"}" {IF {Dropdown1} = "AlItalia" "{Includepicture
"D:\\Fake Stuff\\1 AWB Logos\\AlItalia.jpg"}" {IF {Dropdown1} =
"Emirates" "{Includepicture "D:\\Fake Stuff\\1 AWB
Logos\\Emirates.jpg"}" "" }}}

Thanks so much
mercedes