View Single Post
  #4  
Old July 16th, 2009, 05:49 PM posted to microsoft.public.word.mailmerge.fields
Christine
external usenet poster
 
Posts: 402
Default Mail Merge with Access as a data source

This is the best explanation I've seen for the problem. But, I need a bit
more help.

How do I do this in Word 2007? One of the Microsoft sites gives detailed
steps using Word 2003, (however, I think the quotation marks are in the wrong
place in that explanation), but not for 2007. When I open the document that
contains all the mergefields, the merge options are grayed out.

How do I replace the statement I have

{INCLUDEPICTURE "{MERGEFIELD thePicturePath}" \*MERGEFORMAT}

with the one you describe?

"macropod" wrote:

Hi Christine,

When embedding a mailmerge field in an INCLUDEPICTURE field for the purpose of merging graphics:
1. the filepaths to the fields ordinarily need to have the separators expressed as '\\' or '/' instead of the usual '\';
2. the pictures usually won't show until you refresh the fields (eg Ctrl-A, then F9); and
3. even after updating the images, they remain linked to the image files, which can be an issue if you need to send the merged
output to someone else.

The following field construction addresses all three issues:
{IF {INCLUDEPICTURE {IF TRUE "C:\Users\My Document Path\Pictures\«Image»"}} {INCLUDEPICTURE {IF TRUE "C:\Users\My Document
Path\Pictures\«Image»"}}}
or
{IF {INCLUDEPICTURE {IF TRUE "C:\Users\My Document Path\Pictures\{MERGEFIELD Image}"}} {INCLUDEPICTURE {IF TRUE "C:\Users\My
Document Path\Pictures\{MERGEFIELD Image}"}}}

After running a mailmerge coded this way, you'll have the correct, unlinked image for each record.
If your path separators are already expressed as '\\' or '/', that will work too.

If the path data are included with in the image field, you can use:
{IF {INCLUDEPICTURE {IF TRUE "«Image»"}} {INCLUDEPICTURE {IF TRUE "«Image»"}}}
or
{IF {INCLUDEPICTURE {IF TRUE "{MERGEFIELD Image}"}} {INCLUDEPICTURE {IF TRUE "{MERGEFIELD Image}"}}}

Note: The field brace pairs (ie '{ }') for the above examples are created via Ctrl-F9 - you can't simply type them or copy & paste
them from this message. Likwise, you can't type the chevrons (ie '« »') - they're part of the actual mergefields, which you can
insert from the mailmerge toolbar.

--
Cheers
macropod
[Microsoft MVP - Word]


"Christine" wrote in message ...
I have a mail merge set up between an Access database and several Word
documents. In my Access database I have a field that contains the path to a
bmp, e.g C:\\data\\thePicture.bmp

When the merge runs, the result looks like this:

{INCLUDEPICTURE C:\\data\\thePicture.bmp \* MERGEFORMAT}

If I preview the document, the picture is not there.

I have to select the INCLUDEPICTURE statement, right click, select Edit
Field, click OK, and Word adds quotes around the picture name:

{INCLUDEPICTURE "C:\\data\\thePicture.bmp" \* MERGEFORMAT}

Then if I preview the document, I see the picture.

I've tried adding the quotes into the Access field, but that doesn't solve
the problem.

How should that path be stored in the Access field?