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

Free Support Forum - aspose.com

How to replace unwanted junk while writing html text to word document

iam getting html text in stringbuilder and we are writing tht stringbuilder(html content) into word document…

stringbuilder osb = new stringbuilder;
oDocBuilder = new DocumentBuilder(oCurrentDoc);
oDocBuilder.Writeln(osb.ToString());

My problem is how to replace any unwanted junk,spaces,characters…still anything junk in html content…

Hi
Thanks for your request. I do not fully understand why you are using Writeln method here. I think, in your case you can try using InsertHtml method. You can find an example here:
https://reference.aspose.com/words/net/aspose.words/documentbuilder/inserthtml/
Best regards,