Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 02-11-2013, 04:30 PM
macropod's Avatar
macropod macropod is offline Mail Merge to email, changing images on email layout Windows 7 64bit Mail Merge to email, changing images on email layout 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

Hi ginelli,

Your image links return a 404 (not found) error.

To embed an image in a document via mailmerge, you need to enclose the mailmerge field in an INCLUDEPICTURE field. Depending on your data setup, a field construction like the following can be used:
{IF {INCLUDEPICTURE {IF TRUE "C:\Users\My Document Path\Pictures\«Image»"} \d} {INCLUDEPICTURE {IF TRUE "C:\Users\My Document Path\Pictures\«Image»"} \d}}


or
{IF {INCLUDEPICTURE {IF TRUE "C:\Users\My Document Path\Pictures\{MERGEFIELD Image}"} \d} {INCLUDEPICTURE {IF TRUE "C:\Users\My Document Path\Pictures\{MERGEFIELD Image}"} \d}}
After running a mailmerge coded this way, you'll have the correct, unlinked image for each record.

If the filepath for the images is held in the mailmerge data source, you could use:

{IF {INCLUDEPICTURE {IF TRUE "«FilePath»\«Image»"} \d} {INCLUDEPICTURE {IF TRUE "«FilePath»\«Image»"} \d}}
or
{IF {INCLUDEPICTURE {IF TRUE "{MERGEFIELD FilePath}\{MERGEFIELD Image}"} \d} {INCLUDEPICTURE {IF TRUE "{MERGEFIELD FilePath}\{MERGEFIELD Image}"} \d}}


Note: You need a path separator between the filepath mergefield and the image mergefield. If that separator is included in the source data, it can be omitted from the field above construction but leaving it there has no adverse effects either.



If the path data are included with in the image field, you can use:
{IF {INCLUDEPICTURE {IF TRUE «Image»} \d} {INCLUDEPICTURE {IF TRUE «Image»} \d}}
or
{IF {INCLUDEPICTURE {IF TRUE {MERGEFIELD Image}} \d} {INCLUDEPICTURE {IF TRUE {MERGEFIELD Image}} \d}}


Note: The field brace pairs (ie '{ }') for the above examples are created in the body of the document via Ctrl-F9 (Cmd-F9 on a Mac) - 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
  #2  
Old 02-13-2013, 12:27 PM
ginelli ginelli is offline Mail Merge to email, changing images on email layout Windows 7 32bit Mail Merge to email, changing images on email layout Office 2010 32bit
Novice
Mail Merge to email, changing images on email layout
 
Join Date: Feb 2013
Posts: 11
ginelli is on a distinguished road
Default

Hi Paul, great stuff, thanks.

Two things:
- the images url I sent you, are examples, so it's normal they give an error;
- everything works on word, when I "save as" a web template, it stops working.

Can you please help?

Regards,

Luis
Reply With Quote
Reply

Tags
email, html, mail merge



Similar Threads
Thread Thread Starter Forum Replies Last Post
Mail Merge won't email QEDDave Mail Merge 11 10-29-2014 09:44 PM
Mail Merge to email, changing images on email layout Mail Merge to Email via Outlook Express Baldeagle Mail Merge 8 05-11-2012 02:56 AM
Outllook & Word '07 - can't mail-merge email chayden Outlook 5 10-08-2011 06:58 AM
Convert mail merge to PDF then email TeriJean Mail Merge 0 10-04-2011 03:52 PM
Mail Merge via Proxy Email? ghillie30 Mail Merge 0 07-08-2011 06:26 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 03:15 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft