I would like to achieve something like the following possibly by using conditional mail merge.
“If someFieldMeetsCondition then insert some text a Merge Field and some more text.” (Bold for emphasis only)
{IF {MERGEFIELD PurchaseDate} != "" The purchase {MERGEFIELD Description} was approved on {MERGEFIELD PurchaseDate}.
The above definition of the mail merge is not syntactically correct, but I’m at a loss of how to get this working.
Thanks for your inquiry. You should use “<>” instead of “!=”. For example, see the following field code: { IF "{ MERGEFIELD test }" <> "test" "this is my mergefield { MERGEFIELD myfield }" "" }
Hope this helps.
Best regards.
Thank you for your response.
Maybe I’m not entering the data in Word correctly. Could you please attach a Word (docx) file with a properly defined Merge field? Given the values you used above should the following code work? (note that the value for the test field <> “test” )
Clarification: When the value of “test” = “” there should not be any text rendered.
I have not been able to find any sample projects that demonstrates conditional mailmerge. If you have any that would be helpful as the above is only a sample - we have more complex scenarios as well.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.