includepicture with problems in mailmerge

A

Anderflash

If I use:
{includepicture "c:\folder1\folder2\photo.jpg"}
and save the document, the includepicture will become:
{includepicture "photo.jpg"}

And if the document is in c:\folder1\folder2\folder3, the includepicture
will become:
{includepicture "..\photo.jpg"}

Is there a solution to keep the absolute path? Because this absolute path is
a docproperty field with if field and others fields, besides the mergefield.
So, because this behaviour, I lose all my fields inside the includepicture.
And I don't want to include only photo.jpg, because the includepicture field
uses the curDir from the Word. So, if the user double-click the document, the
includepicture won't work. So, I want to (with VBA) include the absolute path
(and keeping it).
 
G

Graham Mayor

The correct syntax would be
{includepicture "c:\\folder1\\folder2\\photo.jpg"}
If you have the path c:\\folder1\\folder2\\ in a docproperty field
then
{ includepicture "{ DOCPROPERTY Path }Photo.jpg" }
or with merge
{ includepicture "{ DOCPROPERTY Path }{Mergefield Photo}.jpg"
or am I missing something here?

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
B

Brian Smither

The correct syntax would be
{includepicture "c:\\folder1\\folder2\\photo.jpg"}

My similar problem is that even with the correct syntax, ie (all one line
but broken up to show the logic):

{ INCLUDEPICTURE
{ IF A > 1
"D:\\images\\blueblock-v.gif"
"D:\\images\\space.gif" }
\* MERGEFORMAT }

Eventually at some point, the path collapses to:

"images/blueblock-v.gif"

And, eventually, the If..Then..Else also disappears leaving only:

{ INCLUDEPICTURE "images/blueblock-v.gif" \* MERGEFORMAT }

I think this usually happens when I try to update the fields in the source
document during a "View Merged Data" preview of the records.

How do I stop this collapsing of the fields?
 

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