Generate documents from complex word template

I would like to create a dynamic report template in microsoft word which holds placeholders that are replaced dynamically from database.

The idea is that the placeholders could be plain text, image or html text which needs to be rendered at runtime.

From my research, I’ve found that i could do this through either bookmarks or Merge fields.
Would anyone recommend which approach is the best to deal with in aspose words especially that the main content would be html text retrieved from html editor.

PLUS, i want to know also the limitations of the other approach.

Hi Hussein,


Thanks for your inquiry. We would recommend merge fields. Aspose.Words for Java provides extensive mail merge engine for dealing with merge fields. Please refer to the following section of documentation:
Mail Merge and Reporting

On the other hand, the actions that can be performed with bookmarks using Aspose.Words are the same as the ones you can perform using Microsoft Word. You can insert a new bookmark, delete, move to a bookmark, get or set a bookmark name, get or set text enclosed in it. However, there is no reporting engine in MS Word or Aspose.Words that deals with bookmarks.

Best regards,