Remove All Comments from Documents

VSTO Words

Call the DeleteAllComments method of the Document from which you want to remove comments.The following code example removes all comments from the active document. To use this code example, run it from the ThisAddIn class in your project.

this.Application.ActiveDocument.DeleteAllComments();

Aspose.Words

Below is the code to remove comments from the document.

string FileName = "YourFileName.docx";
Document doc = new Document(FileName);

// Collect all comments in the document
NodeCollection comments = doc.GetChildNodes(NodeType.Comment, true);

// Remove all comments.
comments.Clear();

For more details you can go here

Download Running Code Example

Sample Code