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

Free Support Forum - aspose.com

Removing all comments from a document

I would like to remove all comments from a word document using Aspose, could you give me an example of how I could do that?



Thanks for your inquiry. You can try using the following code.

//Open the document

Document doc = new Document(@"Test051\in.doc");

//Get collection of comments

NodeCollection comments = doc.GetChildNodes(NodeType.Comment, true);

//Remove comments


//Save document


I hope this could help you.

Best regards.

perfect, thank you!