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  

Use mail merge to insert image using path in datasource



 
 
Thread Tools Display Modes
  #1  
Old June 26th, 2009, 12:42 AM posted to microsoft.public.word.mailmerge.fields
JeffC
external usenet poster
 
Posts: 25
Default Use mail merge to insert image using path in datasource

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?
  #2  
Old June 26th, 2009, 03:19 AM posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP
external usenet poster
 
Posts: 8,239
Default Use mail merge to insert image using path in datasource

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 EditReplace

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 EditReplace 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
"JeffC" wrote in message
...
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?


  #3  
Old June 28th, 2009, 04:33 AM posted to microsoft.public.word.mailmerge.fields
macropod[_2_]
external usenet poster
 
Posts: 2,402
Default Use mail merge to insert image using path in datasource

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.

--
Cheers
macropod
[Microsoft MVP - Word]


"JeffC" wrote in message ...
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?


 




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 06:47 PM.


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