I'm doing a merge from a Delphi application into Word. One of the
fields in the merge data is the full path to a jpeg file that I want
included in the output document. I'm using the IncludePicture field as
follows:
{IF { MERGFIELD LocalImageFile}<>"" {INCLUDEPICTURE {MERGEFIELD
LocalImageFile}} "Typed Drawing"}
I've included the line:
{IF { MERGFIELD LocalImageFile}<>"" {MERGEFIELD LocalImageFile}}
to insert the LocalImageFile field into the output document just to
check that Word is receiving the proper file name. It is.
The problem is that Word is inserting the same graphic (from an earlier
merge, I think) in every IncludePicture field.
I've tried every combination of quotation marks, spacing and the like.
I'm baffled.
Anyone have any ideas?
TIA
- Jeff
Graham Mayor - 17 Sep 2004 17:57 GMT
Merge to a new document. Select all (CTRL+A) then update (F9).
See http://www.gmayor.com/mail_merge_graphics.htm

Signature
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP
My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
> I'm doing a merge from a Delphi application into Word. One of the
> fields in the merge data is the full path to a jpeg file that I want
[quoted text clipped - 22 lines]
>
> - Jeff
JSonnabend - 17 Sep 2004 20:39 GMT
Thanks, Graham, but that didn't do the trick. I was pulling my hair
out (which I can ill-afford to do) reading and trying everything I
could find. I finally tried using the INCLUDEPICTURE field outside of
the IF construct, and that worked. I've written a quick macro that
does some formatting after the merge, including removing all the errors
that show up for records without images.
I guess that qualifies as a bug. I wonder if anyone else has seen this
behavior.
- Jeff
Graham Mayor - 18 Sep 2004 09:19 GMT
Because of the conditional field, it may be that the update didn't work
correctly. Updating is a bit of a black art :)
Try using the macro code at - http://www.gmayor.com/installing_macro.htm to
update the merged document.

Signature
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP
My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
> Thanks, Graham, but that didn't do the trick. I was pulling my hair
> out (which I can ill-afford to do) reading and trying everything I
[quoted text clipped - 7 lines]
>
> - Jeff