mail merge pictures

F

Feng

Hi

I successfully inserted variable pictures into the document using the procedure described on the Word MVP website. Afterward, I wanted to add a feature so that when the field that contains the alias to the picture is empty, word will choose a default picture. So, i used the following macro
{IF {Mergefield LIST} <> "" "{INCLUDEPICTURE "C:\\proj\\hrosen\\JPT0803\\Signature\\{Mergefield LIST}.bmp" \d }" "{INCLUDEPICTURE "C:\\proj\\hrosen\\JPT0803\\sign1.bmp.bmp" \d}"
In Word, I can select different records, highlight the page and press F9 to update and the picture will update. However, when I merge, it seems like word no longer looks at the if field and includepicture field as fields, because the first image was used for each record. When I tried to reveal code by using alt+F9 in the merged document, the images remained as images and did not reveal the code. What am I doing wrong? And is it possible to add a separate picture when the field is empty in Word

Thanks
 
P

Peter Jamieson

Some of these problems are to do with the sequence in which Word evaluates
fields.

First, I suggest you try nesting the other way around, e.g.

{ INCLUDEPICTURE "C:\\proj\\hrosen\\JPT0803\\Signature\\{ IF { Mergefield
LIST } = "" "sign.bmp" "{ MERGEFIELD list }.bmp" }" \d }

Then I suggest you check Tools|Options|Print|Update links and update fields
(only one is really needed but I can never remember which). You may also
still need to select the output document and update all the fields (assuming
they are now there).
--
Peter Jamieson
MS Word MVP

Feng said:
Hi,

I successfully inserted variable pictures into the document using the
procedure described on the Word MVP website. Afterward, I wanted to add a
feature so that when the field that contains the alias to the picture is
empty, word will choose a default picture. So, i used the following macro:
{IF {Mergefield LIST} <> "" "{INCLUDEPICTURE
"C:\\proj\\hrosen\\JPT0803\\Signature\\{Mergefield LIST}.bmp" \d }"
"{INCLUDEPICTURE "C:\\proj\\hrosen\\JPT0803\\sign1.bmp.bmp" \d}" }
In Word, I can select different records, highlight the page and press F9
to update and the picture will update. However, when I merge, it seems like
word no longer looks at the if field and includepicture field as fields,
because the first image was used for each record. When I tried to reveal
code by using alt+F9 in the merged document, the images remained as images
and did not reveal the code. What am I doing wrong? And is it possible to
add a separate picture when the field is empty in Word?
 

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