Use mail merge to insert image using path in datasource

J

JeffC

Can you use the mail merge function to insert an image into the word
document? In other words, if my data source has
C:\Administrator\Desktop\image.jpg in one of the fields, is there a way to
force word to bring in the image?
 
D

Doug Robbins - Word MVP

You will need to modify the data source so that the data is in either of the
following formats

C:/Administrator/Desktop/image.jpg

C:\\Administrator\\Desktop\\image.jpg

What is the data source? For any Office data source, it should be possible
to do this using Edit>Replace

If it is something that does not allow you to use that method, use the
original data source with a directory type mail merge in the main document
of which you have a one row table into the cells of which you insert the
mergefields. When you execute that merge to a new document, that document
will contain a table with a row of data for each record in the data source.
You can then use Edit>Replace on that document and then insert a row at the
top of the table into which you insert the names of the mergefields that you
want to use. Then save and use that document as the data source for the
merge that you originally wanted to create.

--
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
 
M

macropod

Hi JeffC,

Yes, you can do this without modifying the data path. You can use a field coded as:
{IF {INCLUDEPICTURE "{IF TRUE «Image»}"} {INCLUDEPICTURE "{IF TRUE «Image»}"}}
where 'Image' is the field name for your image data.

Unlike the method Doug suggests, the above approach avoids the need to refresh the links after the merge, plus it unlinks the images
from the source files, which you'd need to do anyway before sending the merged output to anyone else.

Note: The field brace pairs (ie '{ }') for the above example 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.
 

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