Free Support Forum -

DocumentBuilder.insertHtml method


I want to insert into a DOCX an HTML using a target user style. I have used the code below but it’s not working, the inserted paragraphs have the ‘Normal’ style.


Thanks in advance for your answer.


Benoît Hénaud


Thanks for your request. The content inserted by Insert HTML does not inherit formatting specified in DocumentBuilder options. Whole formatting is taken from HTML snippet.

But you can try using the workaround provided by Adam in this thread:

Hope this helps.

Best regards,

Andrey - is there any way to suppress the formatting in the HTML? We are inserting HTML that contains tags to change font size and color, but when we output this document, we want the font standardized to be the same throughout the merged document. Will this project do that?


Todd Davis

UniMed Direct


Thank you for additional information. Have you tried using the approach suggested by Adam? I think it is exactly what you are looking for.

Best regards,