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

Free Support Forum - aspose.com

Replace text with HTML text

I am in search of a product that will allow me to open a Word document (.doc), search for a string such as “<>”, and replace this string with a string containing formatted HTML including indentation and tables, and finally save the document as a PDF file. I don’t want to see the HTML tags, just the formatted text. Can anyone tell me if the Aspose.Words product can do this? If so, can you provide a code example. Thanks.


Thank you for your interest in Aspose.Words. You can achieve this using ReplaceEvaluator. Please see the following link to learn more:


Best regards.

After I insert the HTML text, I need to refresh the page number in the page footer for the all the pages in the word document. How do I do this?


Thanks for your request. Usually page numbers and number of pages in MS Word documents are inserted as PAGE and NUMPAGES fields. If so, you do not need update anything. MS Word will automatically update these fields.

If you have problems with page numbering, please attach sample document here for testing.

Best regards.

Good point. However, the Word document that I am inserting my text into is generated from SQL Server Reporting Services and it does not use these built in functions to format the page numbers. I wish it did. Is there a way to insert the PAGE and NUMPAGE function into the Word document footer using Aspose.Words?

I have attached the Word document that is generated from SQL Server Reporting Services so that you can see how the page numbers are currently formatted.

Thanks for your help.


Thanks for your request. Sure, you can insert fields using Aspose.Words. Here you can find an example:


Do you use Aspose.Words for Reporting Services to export your reports to Word documents? If so, please attach your rdl and rdl.data files here for testing.

Best regards.