A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Word » Mailmerge
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Mail Merge with Access as a data source



 
 
Thread Tools Display Modes
  #1  
Old July 10th, 2009, 04:21 PM posted to microsoft.public.word.mailmerge.fields
Christine
external usenet poster
 
Posts: 402
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?






Ads
  #2  
Old July 10th, 2009, 11:15 PM posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP
external usenet poster
 
Posts: 8,239
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  
Old July 11th, 2009, 10:17 AM posted to microsoft.public.word.mailmerge.fields
macropod[_2_]
external usenet poster
 
Posts: 2,402
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  
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?








  #5  
Old July 16th, 2009, 10:43 PM posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP
external usenet poster
 
Posts: 8,239
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  
Old July 17th, 2009, 09:37 PM posted to microsoft.public.word.mailmerge.fields
Christine
external usenet poster
 
Posts: 402
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?










 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 05:52 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
Copyright 2004-2018 OfficeFrustration.
The comments are property of their posters.