View Single Post
 
Old 06-01-2012, 01:47 AM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

In your Excel workbook, instead of (or as well as) the pictures, insert their filenames.

Then, in Word, insert a field coded as:
{IF {INCLUDEPICTURE {IF TRUE "C:\Users\My Document Path\Pictures\«Image»"} \d} {INCLUDEPICTURE {IF TRUE "C:\Users\My Document Path\Pictures\«Image»"} \d}}
where 'C:\Users\My Document Path\Pictures' is the path to those pictures and '«Image»' is a mergefield that points to whatever name you give the heading row that contains the image filenames. The filepath is probably something like:
C:\Program Files\Microsoft Office\MEDIA\CAGCAT10
You can find the correct path for a given image via Insert|Clipart, selecting an image then choosing 'Properties'.

If the images are in a variety of different folders, you'll need to add the filepaths to Excel as well. If you add them to the same cells that contain the filenames, the field construction in Word can be simplified to:
{IF {INCLUDEPICTURE {IF TRUE «Image»} \d} {INCLUDEPICTURE {IF TRUE «Image»} \d}}
If, however, you put the filepaths in a separate column, you'll need a field construction like:
{IF {INCLUDEPICTURE {IF TRUE "«FilePath»\«Image»"} \d} {INCLUDEPICTURE {IF TRUE "«FilePath»\«Image»"} \d}}

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. Likewise, you can't type or copy & paste the chevrons (ie '« »') - they're part of the actual mergefields, which you can insert from the mailmerge toolbar.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote