Insert HTML

This example explains how to insert HTML on a MERGEFIELD. executeMailMerge API lets you insert HTML on a merge field. The mail merges data string can be either in XML or JSON format.

Please escape HTML characters in data source string and use “format”=“html” attribute.

Usage examples with cURL and Postman

You can carry out REST API interactions using cURL and Postman. Please read these instructions to receive a personal JWT_TOKEN for authorization.

Download sample template.doc and TestExecuteMailMergeData.xml files for testing purposes. The output document would be as follows: TestPostDocumentExecuteMailMerge.docx.

Aspose.Words Cloud SDK Family

Using SDK is the best way to speed up the development. Our Cloud SDKs take care of low-level details and let you focus on your primary tasks. Check out our GitHub repository for a complete list of Aspose.Words SDKs. Please check Available SDKs article to learn how to add an SDK to your project.

Usage examples in Python, Java, C#, etc.

The following code samples show how to interact with the REST API using almost any mainstream programming language.

You can find a lot of other examples in Python, Java, C#, JavaScript, PHP, C++, Golang, Ruby, Swift, Dart on GitHub. All codes are thoroughly tested and ready for production use.