Forum Discussion
Inserting an image to a Word mailmerge template based on the value of a merge field?
I wish to insert an image to a mailmerge document when the value of a mailmerge field is equal to "Direct Debit" and not insert anything if not equal to "Direct Debit".
I've attempted to achieve this using INCLUDEPICTURE nested into an IF statement as shown below, although I cannot get an image to insert to the document when merge field value PAYMENTTYPE = "Direct Debit".
{IF {MERGEFIELD PAYMENTTYPE} = "Direct Debit" { INCLUDEPICTURE "{ IF TRUE "I:\\...\\DD image\\Direct-Debit-Logo.jpg"}" \d "" }
I'd like to know other methods of achieving this if the above is not feasible.
Any help greatly appreciated.
- Andrea BowyerCopper Contributor
Hi
This should do the trick:
{ IF { MERGEFIELD PAYMENTTYPE } = "Direct Debit" { INCLUDEPICTURE "I:\\filepath…\\Direct Debit Logo.jpg" \* MERGEFORMAT } "" }
Hope that helps.
Regards
Andrea