We're sorry AsposeCloud doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.cloud

How to If Else Condition and Loops in Mail Merge with Ruby

Hello,

I have integrated the Aspose Words Cloud in my Ruby application and mail merge fields are working great.

But in case of If / Else Conditions and Loops, I didn’t understand how to add them in the template and execute them with the data. I have looked in the documentation but wasn’t able to find the right mechanism to add these in a template.

Help in this regard will be highly appreciated. Thanks.

Secondly, can we insert one template into another on run time?

@aliawan

Mustache syntax supports IF/Else conditions. Please check the following documentation for more details.

@aliawan

You can merge multiple Word documents using Aspose.Words Cloud. Please check the following documentation for more details.

@tilal.ahmad

Actually, is it possible if I want to insert a template into another template at any position i.e. it can be the start of the template, it can be in the middle of the template between the texts? Rather than merging 2 templates one after the other.

@aliawan

I am afraid you can not insert a document(template) in the middle of another document but can append a document at the start or end of the other document.