Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Christine Christine is offline
external usenet poster
 
Posts: 45
Default Mail Merge with Access as a data source

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?






  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP Doug Robbins - Word MVP is offline
external usenet poster
 
Posts: 8,832
Default Mail Merge with Access as a data source

In you mail merge main document, you need to place quotes around the
mergefield inside the IncludePicture field

{ INCLUDEPICTURE "{ MERGEFIELD [FieldName] }" }

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP, originally posted via msnews.microsoft.com
"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?







  #3   Report Post  
Posted to microsoft.public.word.mailmerge.fields
macropod[_2_] macropod[_2_] is offline
external usenet poster
 
Posts: 2,059
Default Mail Merge with Access as a data source

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?







  #4   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Christine Christine is offline
external usenet poster
 
Posts: 45
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?








  #5   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP Doug Robbins - Word MVP is offline
external usenet poster
 
Posts: 8,832
Default Mail Merge with Access as a data source

If thePictureParth field contains the path and filename of the picture, from
the construction that you have, delete the \* MERGEFORMAT (as it does
nothing) so that you have

{ INCLUDEPICTURE "{ MERGEFIELD thePicturePath }" }

Then copy that and type a space after it and then paste it to the right of
the space so that you have:

{ INCLUDEPICTURE "{ MERGEFIELD thePicturePath }" } { INCLUDEPICTURE "{
MERGEFIELD thePicturePath }" }

then select each "{ MERGEFIELD thePicturePath }" in turn and press Ctrl+F9
to insert field delimiters either side of those fields so that you have

{ INCLUDEPICTURE { "{ MERGEFIELD thePicturePath }" } } { INCLUDEPICTURE {
"{ MERGEFIELD thePicturePath }" } }

Then between the { and the ", type IF TRUE so that you have

{ INCLUDEPICTURE { IF TRUE "{ MERGEFIELD thePicturePath }" } } {
INCLUDEPICTURE { IF TRUE "{ MERGEFIELD thePicturePath }" } }

Then select the whole field construction and press Ctrl+F9 to enclose it in
field delimiters

{ { INCLUDEPICTURE { IF TRUE "{ MERGEFIELD thePicturePath }" } } {
INCLUDEPICTURE { IF TRUE "{ MERGEFIELD thePicturePath }" } } }

Then type IF between the first two { {

{ IF { INCLUDEPICTURE { IF TRUE "{ MERGEFIELD thePicturePath }" } } {
INCLUDEPICTURE { IF TRUE "{ MERGEFIELD thePicturePath }" } } }


--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP, originally posted via msnews.microsoft.com
"Christine" wrote in message
...
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?











  #6   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Christine Christine is offline
external usenet poster
 
Posts: 45
Default Mail Merge with Access as a data source

Thank you soooo much. It worked perfectly. My users will be thrilled.

I've been looking for a solution to this for ages. I felt so bad that they
had to go through all those extra clicks to get their work done, but I
couldn't find the help I needed to fix it.

And thank you for detailing the steps to get it right. So often responses
are just vague suggestions on how to fix a problem and you end up no better
than when you started.

I'm still not quite sure why the Write & Insert Fields options are grayed
out when I open my merge document in Office 2007. But I don't think I'll be
making any modifications any time soon.

"Doug Robbins - Word MVP" wrote:

If thePictureParth field contains the path and filename of the picture, from
the construction that you have, delete the \* MERGEFORMAT (as it does
nothing) so that you have

{ INCLUDEPICTURE "{ MERGEFIELD thePicturePath }" }

Then copy that and type a space after it and then paste it to the right of
the space so that you have:

{ INCLUDEPICTURE "{ MERGEFIELD thePicturePath }" } { INCLUDEPICTURE "{
MERGEFIELD thePicturePath }" }

then select each "{ MERGEFIELD thePicturePath }" in turn and press Ctrl+F9
to insert field delimiters either side of those fields so that you have

{ INCLUDEPICTURE { "{ MERGEFIELD thePicturePath }" } } { INCLUDEPICTURE {
"{ MERGEFIELD thePicturePath }" } }

Then between the { and the ", type IF TRUE so that you have

{ INCLUDEPICTURE { IF TRUE "{ MERGEFIELD thePicturePath }" } } {
INCLUDEPICTURE { IF TRUE "{ MERGEFIELD thePicturePath }" } }

Then select the whole field construction and press Ctrl+F9 to enclose it in
field delimiters

{ { INCLUDEPICTURE { IF TRUE "{ MERGEFIELD thePicturePath }" } } {
INCLUDEPICTURE { IF TRUE "{ MERGEFIELD thePicturePath }" } } }

Then type IF between the first two { {

{ IF { INCLUDEPICTURE { IF TRUE "{ MERGEFIELD thePicturePath }" } } {
INCLUDEPICTURE { IF TRUE "{ MERGEFIELD thePicturePath }" } } }


--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP, originally posted via msnews.microsoft.com
"Christine" wrote in message
...
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?










Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Mail Merge - multiple Access tables as data source Julia DB Mailmerge 1 April 8th 08 07:44 PM
Mail Merge in Word XP using Access XP as the data source Steve[_7_] Mailmerge 1 August 21st 07 04:04 PM
Using Access as mail merge data source Jacob Behounek Mailmerge 2 January 11th 06 11:51 PM
Unable to use Access queries as data source for a mail merge doc dhall Mailmerge 0 November 21st 05 05:50 PM
How can I fix the Access data source of the mail merge for Word LCC Mailmerge 0 August 29th 05 03:52 PM


All times are GMT +1. The time now is 08:10 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"