Home

Inserting an image to a Word mailmerge template based on the value of a merge field?

%3CLINGO-SUB%20id%3D%22lingo-sub-721611%22%20slang%3D%22en-US%22%3EInserting%20an%20image%20to%20a%20Word%20mailmerge%20template%20based%20on%20the%20value%20of%20a%20merge%20field%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-721611%22%20slang%3D%22en-US%22%3E%3CP%3EI%20wish%20to%20insert%20an%20image%20to%20a%20mailmerge%20document%20when%20the%20value%20of%20a%20mailmerge%20field%20is%20equal%20to%20%22Direct%20Debit%22%20and%20not%20insert%20anything%20if%20not%20equal%20to%20%22Direct%20Debit%22.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI've%20attempted%20to%20achieve%20this%20using%20INCLUDEPICTURE%20nested%20into%20an%20IF%20statement%20as%20shown%20below%2C%20although%20I%20cannot%20get%20an%20image%20to%20insert%20to%20the%20document%20when%20merge%20field%20value%20PAYMENTTYPE%20%3D%20%22Direct%20Debit%22.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%7BIF%20%7BMERGEFIELD%20PAYMENTTYPE%7D%20%3D%20%22Direct%20Debit%22%20%7B%20INCLUDEPICTURE%20%22%7B%20IF%20TRUE%20%22I%3A%5C%5C...%5C%5CDD%20image%5C%5CDirect-Debit-Logo.jpg%22%7D%22%20%5Cd%20%22%22%20%7D%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI'd%20like%20to%20know%20other%20methods%20of%20achieving%20this%20if%20the%20above%20is%20not%20feasible.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAny%20help%20greatly%20appreciated.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-722001%22%20slang%3D%22en-US%22%3ERe%3A%20Inserting%20an%20image%20to%20a%20Word%20mailmerge%20template%20based%20on%20the%20value%20of%20a%20merge%20field%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-722001%22%20slang%3D%22en-US%22%3E%3CP%3EHi%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F365589%22%20target%3D%22_blank%22%3E%40TrickyTrees%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThis%20should%20do%20the%20trick%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%7B%20IF%20%7B%20MERGEFIELD%20PAYMENTTYPE%20%7D%20%3D%20%22Direct%20Debit%22%20%7B%20INCLUDEPICTURE%20%22I%3A%5C%5Cfilepath%E2%80%A6%5C%5CDirect%20Debit%20Logo.jpg%22%20%5C*%20MERGEFORMAT%20%7D%20%22%22%20%7D%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHope%20that%20helps.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ERegards%3CBR%20%2F%3EAndrea%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-722003%22%20slang%3D%22en-US%22%3ERe%3A%20Inserting%20an%20image%20to%20a%20Word%20mailmerge%20template%20based%20on%20the%20value%20of%20a%20merge%20field%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-722003%22%20slang%3D%22en-US%22%3E%3CP%3EHi%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThis%20should%20do%20the%20trick%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%7B%20IF%20%7B%20MERGEFIELD%20PAYMENTTYPE%20%7D%20%3D%20%22Direct%20Debit%22%20%7B%20INCLUDEPICTURE%20%22I%3A%5C%5Cfilepath%E2%80%A6%5C%5CDirect%20Debit%20Logo.jpg%22%20%5C*%20MERGEFORMAT%20%7D%20%22%22%20%7D%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHope%20that%20helps.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ERegards%3CBR%20%2F%3EAndrea%3C%2FP%3E%3C%2FLINGO-BODY%3E
TrickyTrees
Occasional Visitor

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.

1 Reply

Hi

 

This should do the trick:

 

{ IF { MERGEFIELD PAYMENTTYPE } = "Direct Debit" { INCLUDEPICTURE "I:\\filepath…\\Direct Debit Logo.jpg" \* MERGEFORMAT } "" }

 

Hope that helps.

 

Regards
Andrea

Related Conversations
Conditional Formatting - Consider Only Value as Lowest Value
Ben Smith in Excel on
2 Replies
Image being replaced
Deleted in Office 365 on
3 Replies
Teams, granular security, and team templates
Josef Bilek in Microsoft Teams on
2 Replies
Saving Site as Template
Yigit_Yuruker in SharePoint on
4 Replies