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

Free Support Forum - aspose.com

Insert MailMerge Fields into a new document

I would like to create a document that contains several MailMerge fields using aspose.Words for java.
I didn’t find anything in the api documentation. Is there an easy way to do this?
The mailMerge fields would be generated (so this won’t be static ones)?


<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thanks for your request. You can use DocumentBuilder.insertField method to insert mergefields into the document:

http://www.aspose.com/documentation/java-components/aspose.words-for-java/com/aspose/words/documentbuilder.html#insertField(java.lang.String, java.lang.String)

Hope this helps. Please let me know if you need more assistance, I will be glad to help you.

Best regards.