IncludePicture not working properly

  • Thread starter Thread starter Petrina
  • Start date Start date
P

Petrina

I'm using MSWord 2002, Access 2002 and Win 2000.

I try to use the mail merge function to merge a dB from Access to
MSWord.

All the text fields are working EXCEPT the image file. I go through a
few forum and found out I need to use INCLUDEPICTURE command.

I have the following command in MSWord where Photo_location is the
actual dB fieldname and with the image filename.

{INCLUDEPICTURE "E:\\Documents and Settings\\Administrator\\My
Documents\\IDCardPrinter\\Photos\\{MERGEFIELD Photo_location}.bmp"}

However, it doesn't show the picture at all !! :confused:

If I replaced {MERGEFIELD Photo_location}.bmp with the actual
filename, then it works.

Could anyone please help?

:(
 
Hi Petrina,

1. Could you give us an example of EXACTLY what is in the merge field?
And check for leading and trailing spaces. Best would probably be to
TAB into the field in the data table, then COPY and paste into your
reply.

(You might also try this in the main merge document, to see if the
field works with the explicit field content. That might help you find
the problem).

2. I'd also try running the mail merge to a new document, and there do:
Ctrl+A, F9 and see if at least some of the pictures show up?
I'm using MSWord 2002, Access 2002 and Win 2000.

I try to use the mail merge function to merge a dB from Access to
MSWord.

All the text fields are working EXCEPT the image file. I go through a
few forum and found out I need to use INCLUDEPICTURE command.

I have the following command in MSWord where Photo_location is the
actual dB fieldname and with the image filename.

{INCLUDEPICTURE "E:\\Documents and Settings\\Administrator\\My
Documents\\IDCardPrinter\\Photos\\{MERGEFIELD Photo_location}.bmp"}

However, it doesn't show the picture at all !! :confused:

If I replaced {MERGEFIELD Photo_location}.bmp with the actual
filename, then it works.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Sep 30 2003)
http://www.mvps.org/word

This reply is posted in the Newsgroup; please post any follow question
or reply in the newsgroup and not by e-mail :-)
 
Hi Cindy,

Thank you very much for your info.

1. Photo_location is declare as 'Text' field in Access dB, and it's
just the filename of an image file.

It works if I use this command:
{INCLUDEPICTURE "E:\\Documents and Settings\\Administrator\\My
Documents\\IDCardPrinter\\Photos\\Petrina.bmp"}

So somehow it just not working when I use INCLUDEPICTURE and MERGEFIELD
together.

2. What do you mean by "I'd also try running the mail merge to a new
document"? I tried to run mail merge on a separate new doco with just
image file, however, still no luck. Not even display any photos.

Anything else I can do?
:confused:
 
I worked it out FINALLY. :D

For the MERGEFIELD within INCLUDEPICTURE, I need to insert Ctrl+F9,
i.e. {} instead of just key-in '{' and '}'.

Sorry for my mistake.

1. Now it has another problem, the size of the photo is not fix, any
way I can pre-set the size of each photo?

2. And also the photo does not update automatically, is macro the only
way I can get it update automatically?

Thanks again for anyone's advise.
 
Hi Petrina,
For the MERGEFIELD within INCLUDEPICTURE, I need to insert Ctrl+F9,
i.e. {} instead of just key-in '{' and '}'.
Glad you figured it out :-) We might eventually have hit on asking you
that, but then again, maybe not!
1. Now it has another problem, the size of the photo is not fix, any
way I can pre-set the size of each photo?
As long as the result should retain its original proportions, you can do
this by putting the IncludePicture field into a FRAME (from the Forms
toolbar). Set the width or height (whichever is most critical) to an
EXACT measurement. That dimension will be constrained, and the picture
sized proportionately.
2. And also the photo does not update automatically, is macro the only
way I can get it update automatically?
Well, Ctrl+A then F9 will update the pictures in the merge result
document. Or then a macro that forces the field updates, yes.

And you can TRY turning on "automatically update fields" in
Tools/Options/Print if you're merging to the printer (no guarantees, but
it might work).

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Sep 30 2003)
http://www.mvps.org/word

This reply is posted in the Newsgroup; please post any follow question
or reply in the newsgroup and not by e-mail :-)
 
Back
Top