Removal of comment

Hi,
I tried to remove comment of a word document by getting comment(node) object and calling comment.remove(). But it is not deleting comment from the physical document. May I get any assistance regarding this?
Thanks.

Dear Spoorphy,

Thank you for yor question.

To remove comments from yor input document just run the followin code:

Document document = new Document(MyDir + "in.docx");
// Get all comments.
NodeCollection comments = document.getChildNodes(NodeType.COMMENT, true);
// Remove all comments.
comments.clear();
document.save(MyDir + "out.docx");

Hope that is you look for.