Complex mail merge picture question

August 24, 2012 at 04:42:38
Specs: Windows 7

I am trying to do a bit more special mail merge including pictures.
My database is in Excel where the entire path of the pictures is included with \\ instead of \.
At first I used following command to merge the pictures to Word:


This works fine for me.
However, I was suddenly in the situation that a picture did not exist for some of my mail merges, and I wanted it to return a text saying "No picture" or just leaving the place blank.
I therefore added a column in Excel with a 1 for every picture and 0 if no picture, calling this "Number".
I then used following:

{IF {MERGEFIELD Number} = "1" "{INCLUDEPICTURE "{IF TRUE {MERGEFIELD Picture} }"\d}" "No picture" }

It works fine when there is no picture, then the text "No picture" is returned. But when the picture should be returned, I just get the error message "Error! Filename not specified".

Can you help me get this to work?

See More: Complex mail merge picture question

Report •

August 24, 2012 at 11:36:57
I'm not really good at MS Word. Haven't needed to do this in years, but:

Why do you have:

{ IF TRUE {MERGEFIELD Picture} }"\d }

Wouldn't just:

{MERGEFIELD Picture \d }

produce the same result?

See if this works:

{ IF { MERGEFIELD Number } = "1" "{ INCLUDEPICTURE Picture \d }" "No picture" }


Report •

September 19, 2012 at 03:36:29
I write the
with the "if true" part to force the picture to update for every merge. Otherwise it will just show one picture no matter which mail merge I try to see/print.

I tried to write in the suggested code
{ IF { MERGEFIELD Number } = "1" "{ INCLUDEPICTURE Picture \d }" "No picture" }
If I write it like this I get "No picture" in all situations. If I reverse it
{ IF { MERGEFIELD Number } = "0" "No picture" "{ INCLUDEPICTURE Picture \d }" }
I get "Error! Filename not specified" in all situations!

Any other suggestions? It can't be that I'm the only one ever tried to do this??

Report •

September 19, 2012 at 06:45:17
Sorry out ideas, but this might be of assistance:


Report •

Related Solutions

Ask Question