Word 2007 - merge image data from Sql datasource

M

Mort Strom

Hi all,

I am creating a mail merge in Word 2007 and wondering if it is possible to
merge pictures. My data source points to a SQL Server and I can
successfully capture desired text fields. However, I don't know how to
insert the picture data. The image data coming from my data source is the
raw image itself.

Can pictures be included in a mail merge with data coming from SQL?

Thanks for any direction,
Mort
 
P

Peter Jamieson

Unfortunately not. You can only really insert them by using an
INCLUDEPICTURE field, and that has to get the picture from an ordinary image
file such as a .jpg file that resides in a file system somwhere. So you
really have to extract each picture to a file before you merge, and ensure
that you can construct the picture's path name from the data in the relevant
record (i.e. typically you need to name the picture files with the primary
key data). You could probably extract them on the server (and if it's on a
WIndows network, put them in a folder on the netwrok somewhere) using a
Stored Procedure but because it's at least /hard/ to use a stored procedure
as a data source (and I don't think it is actually possible in current
versions of Word) you still have to do it before the merge.
 

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