Code to Insert HTML in Word DOCX Document using C# .NET

I’m using ReplaceText from DocX API to create a report using a Word file as template. I’m want to add support to rich text and insert images on the placeholder, html seems a natural fit. In DocX says it supports, but the example file does not show how it is done. When I browse the documentation there is this method: https://doc.xceed.com/xceed-document-libraries-for-net/webframe.html#Xceed.Document.NET~Xceed.Document.NET.Document~InsertContent.html but when I download the the lib, this method is not available.

@joaobsneto,

You can easily insert rich HTML content (with images etc) in Word document at any desired placeholder’s location by using Aspose.Words for .NET API. Please refer to the following API page:

In case you have further inquiries or may need any help, please let us know.

@awais.hafeez
Thanks for the response.
Do I have to convert DocX to Document? All my report is built on DocX API.

@joaobsneto,

We can help you here in this forum only for Aspose.Words for .NET API related queries. If you are using any other library, then please find appropriate forum on web and post your query there. If we can help you with anything related to Aspose.Words, please feel free to ask here.