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

Free Support Forum - aspose.com

How can I delete all annotation and revisions in a document

Hi
How can I delete all annotation and revisions in a document
Thank you very much

@zhengkai,

Please ZIP and attach your sample Word document containing the annotations and revisions here for testing. We will then investigate the scenario on our end and provide you more information.

Hi
My document has a image,when I convert it to html ,I found this tag is “<ins><del></del></ins>”.In the document,the Node’s nodeType is 33, How can I delete it

Sorry,html tag here will be escaped
Tag is <ins <del</del</ins

@zhengkai,

You can remove all math equations (node type = 33) from Word document by using following code:

Document doc = new Document("E:\\temp\\input.docx");

Node[] objs = doc.GetChildNodes(NodeType.OfficeMath, true).ToArray();
foreach (Node node in objs)
{
    node.Remove();
}

doc.Save("E:\\Temp\\18.12.docx");

You can also accept or reject revisions before saving to HTML by using the following code:

Document doc = new Document("E:\\temp\\input.docx");
// doc.AcceptAllRevisions();            
foreach (Revision rev in doc.Revisions)
{
    rev.Reject();
}
doc.Save("E:\\Temp\\18.12.html");

Hope, this helps.