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

Free Support Forum - aspose.com

Saving Word Documents with comments as HTML

I have generated a Word document with comments, and when viewed from MS Word, the comments are fine.
However, when the document is saved in html, the comments seemed to be converted to ‘normal text’, which doesn’t make the html output look good.
Is there a way to save the document as html totally ignoring any comments? Alternatively, is there a way that I can remove all of the comments just prior to saving the document?
The Furbster

Thanks for your request. Try to use the following code to remove comments from document and save it as html.

Document doc = new Document(@"182_94036_journeymansix\in.doc");
NodeCollection comments = doc.GetChildNodes(NodeType.Comment, true);
while (comments.Count != 0)
doc.Save(@"182_94036_journeymansix\out.html", SaveFormat.Html);

I hope that it will help you to solve your problem.
Best regards.

is any way can preserve the comment in source document but unvisible in output html?


Hi Pyntia,

Thanks for your inquiry. Could you please attach your input Word document and output HTML file showing the undesired behavior here for testing? We will investigate the issue on our end and provide you more information.

Best regards,