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

Free Support Forum - aspose.com

Can we Merge with HTML content

Hi,

I have a field in my database that contains some HTML code, and I want to merge this field with a template word document.

Do you have a piece of code for me please ?

Thanks

Hi

Thank for your inquiry. Yes, you can achieve this using Aspose.Words. You should use MergeField event handler in this case. Please find an example in the documentation:

http://www.aspose.com/documentation/file-format-components/aspose.words-for-.net-and-java/aspose.words.reporting.mergefieldeventhandler.html

Hope this helps.

Best regards.

bad link…consider adding the example here

Hi

Thanks for your request and my apologizes for inconvenience. The link was broken after refactoring our documentation some time ago. Here is correct link to this article:

http://www.aspose.com/documentation/.net-components/aspose.words-for-.net/aspose.words.reporting.mergefieldeventhandler.html

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

Best regards.

I think the second link is broken too

Hello

Thanks for your request. In the latest version of Aspose.Words MailMerge.MergeField event was replaced with the MailMerge.FieldMerging property and MergeFieldEventHandler was replaced with the IFieldMerging interface. The documentation was refactored in accordance to these changes. Please see the following link to learn more about IFieldMergingCallback:

http://www.aspose.com/documentation/.net-components/aspose.words-for-.net/aspose.words.reporting.ifieldmergingcallback.html

Also, I think this video will be useful for you:

http://www.aspose.com/community/files/51/.net-components/aspose.words-for-.net/entry247978.aspx

Please let me know in case of any issues. I will be glad to help you.

Best regards,