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

Free Support Forum - aspose.com

Reformatting text

I’m trying to generate a word document from an set of html pages. The Html is imported using documentbuilders inserthtml. Unfortunatly the html contains some random unwanted formatting. So I would like to do some basic reformatting on the text. For example I would like to set the font or textcolor to a specific value for a section or paragraph of text.
I could extract the plain text and then reinsert it while doing formatting. But then I would also loose al structure the html had. So what is the best way to do this?

Hi
Thanks for your request. You can try using DocumentVisitor to achieve this. Please see the following forum thread, there was the same issue, I think.
Also follow the link to learn more about DocumentVisitor:
https://reference.aspose.com/words/net/aspose.words/documentvisitor/
Hope this helps.
Best regards.

WOW, Super speedy accurate reply. Wish every company was this fast on it’s forums. Creating a documentvisitor worked and was very effective in reformatting.
Thanks