Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 06-27-2019, 02:08 AM
Jake93 Jake93 is offline Macro to insert an image to a word mailmerge document based on the value of a mailmerge field? Windows 10 Macro to insert an image to a word mailmerge document based on the value of a mailmerge field? Office 2016
Novice
Macro to insert an image to a word mailmerge document based on the value of a mailmerge field?
 
Join Date: Jun 2019
Posts: 2
Jake93 is on a distinguished road
Question Macro to insert an image to a word mailmerge document based on the value of a mailmerge field?

I'd like to insert an image to a mailmerge template when the value of: {MERGEFIELD PAYMENTTYPE} is equal to "Direct Debit".



The data source comes from an external CRM system rather than SQL or excel so the use of 'INCLUDEPICTURE' within an IF statement won't work in this case.

I'd also like to be able to execute this automatically when the mergefields are populated from the external system if possible.

Any help or advice greatly appreciated!
Reply With Quote
  #2  
Old 06-27-2019, 02:13 AM
gmayor's Avatar
gmayor gmayor is offline Macro to insert an image to a word mailmerge document based on the value of a mailmerge field? Windows 10 Macro to insert an image to a word mailmerge document based on the value of a mailmerge field? Office 2016
Expert
 
Join Date: Aug 2014
Posts: 4,101
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

As the mergefield is in the merge document, I don't see that the data source is relevant to whether you can use a conditional field to determine whether to insert a picture based on the value in that mergefield, nor why you cannot use an IncludePicture field as that is the way to insert images.

Graphics merges require a particular syntax - see https://www.gmayor.com/mail_merge_graphics.htm and https://www.gmayor.com/mail_merge_graphics_addin.htm
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote
  #3  
Old 06-27-2019, 03:04 AM
Jake93 Jake93 is offline Macro to insert an image to a word mailmerge document based on the value of a mailmerge field? Windows 10 Macro to insert an image to a word mailmerge document based on the value of a mailmerge field? Office 2016
Novice
Macro to insert an image to a word mailmerge document based on the value of a mailmerge field?
 
Join Date: Jun 2019
Posts: 2
Jake93 is on a distinguished road
Default

Thanks for your reply.

The merge document is created using a word add-in from the external CRM system. This is then logged back to the system (cloud hosted), the template is then populated on the cloud's side using the CRM system, by writing to a particular contact for example using the template. It then exports the document with the merge fields populated with data from contacts selected.

I'm not able to store an image within the cloud database to then reference the path for the image to be inserted for those contacts with "direct debit" as their payment type. So I don't think its possible to to add an image from my local drives using "INCLUDEPICTURE" as the merge execution is not being carried out on my side.

Hope that makes sense..
Reply With Quote
  #4  
Old 07-02-2019, 05:38 PM
macropod's Avatar
macropod macropod is offline Macro to insert an image to a word mailmerge document based on the value of a mailmerge field? Windows 7 64bit Macro to insert an image to a word mailmerge document based on the value of a mailmerge field? Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
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

The INCLUDEPICTURE has nothing to do with an image being stored in a database. See Managing Mailmerge Graphics in the Mailmerge Tips and Tricks 'Sticky' thread at the top of the mailmerge forum (which is where you should have looked in the first place): Mailmerge Tips & Tricks
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro to insert an image based as told puff Word VBA 1 05-24-2018 03:55 PM
Macro to insert an image to a word mailmerge document based on the value of a mailmerge field? IF... THEN... ELSE... rule to insert a Mailmerge Field SoonerLater Mail Merge 3 09-13-2015 03:52 PM
Macro to insert an image to a word mailmerge document based on the value of a mailmerge field? Insert image based on document custom property anandyrh Word 1 08-14-2013 12:08 AM
MACRO - Insert row based on Form Field Criteria Elan05 Word VBA 5 04-16-2013 06:39 AM
Merge Word documents using a mailmerge field Concertina Mail Merge 3 02-18-2013 04:12 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 01:38 AM.


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