Conditionally showing or hiding a picture

A

Andy Pelkey

I am trying to perform a mail merge where people who are
CC'd in the letter receive a copy of the letter with the
word "COPY" appearing in the background of each page (as a
watermark). I know how to insert a picture (with the
image of the word "copy" in it) into the header (so it
appears on each page) and make it look like a watermark.
The problem I am having is how to show or hide this
picture based on a value of a field in the merge data
file. Does anyone know how to do this?

Thanks so much!
 
P

Peter Jamieson

You /may/ be able to do this if you are outputting to a new document or
printer, but I am much less sure it could be made to work for output to
e-mail. YOu can certainly try the following:
a. you will have to insert the picture using an { INCLUDEPICTURE } field
(you may have this already, but it may not be apparent your picture is
probably not currently formatted as an "in-line" picture
b. you will need to put the INCLUDEPICTURE field in a text box, and format
the text box to be behind the text.
c. you will need to modify the field to test the value in your merge data -
suppose you have

{ INCLUDEPICTURE "c:\\mypictures\\watermark.jpg" }

then you could either try something along the lines of

{ IF { MERGEFIELD copy } = "Y"
"{ INCLUDEPICTURE "c:\\mypictures\\watermark.jpg" }"
"" }

or if that doesn't work you could try using a small 1-pixel picture for the
case where you don't need a picture and use something like

{ INCLUDEPICTURE "c:\\mypictures\\{ IF { MERGEFIELD copy } = "Y"
"watermark.jpg" "1pixel.jpg" }" }

where all the {} are the special field code braces you can insert using
ctrl-F9.

Both these approaches seemed to work reasonably well here using Word 2000
and outputting to Acrobat but I could not tell whether the "watermark"
effect was working as you would probably expect, and you really will have to
experiment for yourself on this one.
 
A

andy pelkey

Thank you very much! I will give it a try.
-----Original Message-----
You /may/ be able to do this if you are outputting to a new document or
printer, but I am much less sure it could be made to work for output to
e-mail. YOu can certainly try the following:
a. you will have to insert the picture using an { INCLUDEPICTURE } field
(you may have this already, but it may not be apparent your picture is
probably not currently formatted as an "in-line" picture
b. you will need to put the INCLUDEPICTURE field in a text box, and format
the text box to be behind the text.
c. you will need to modify the field to test the value in your merge data -
suppose you have

{ INCLUDEPICTURE "c:\\mypictures\\watermark.jpg" }

then you could either try something along the lines of

{ IF { MERGEFIELD copy } = "Y"
"{ INCLUDEPICTURE "c:\\mypictures\\watermark.jpg" }"
"" }

or if that doesn't work you could try using a small 1- pixel picture for the
case where you don't need a picture and use something like

{ INCLUDEPICTURE "c:\\mypictures\\{ IF { MERGEFIELD copy } = "Y"
"watermark.jpg" "1pixel.jpg" }" }

where all the {} are the special field code braces you can insert using
ctrl-F9.

Both these approaches seemed to work reasonably well here using Word 2000
and outputting to Acrobat but I could not tell whether the "watermark"
effect was working as you would probably expect, and you really will have to
experiment for yourself on this one.
--
Peter Jamieson
MS Word MVP





.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top