Clear ink annotation from the word document

Hi Support,

What is the way to access ink annotations from word docx file. Our goal is to clear all the ink annotations associated with the docx file.

This message was posted using Email2Forum by Imran Rafique.

Hi Praneeth,

Thanks for your inquiry. Unfortunately, Aspose.Words does not support the requested feature (clear all the ink annotations) at the moment. However, we have logged this feature request as WORDSNET-9859 in our issue tracking system. You will be notified via this forum thread once this feature is available.

We apologize for your inconvenience.

@PraneethS

Thanks for your patience. It is to update you that we have closed the issue (WORDSNET-9859) with “Won’t Fix” resolution. The Ink Annotation is simple shape with a name “Ink + {ID}”. You can remove it using Shape.Remove method as shown below.

Document doc = new Document(MyDir + @"input.docx");
Node[] shapes = doc.GetChildNodes(NodeType.Shape, true).ToArray();
foreach (Shape shape in shapes)
{
    if (shape.Name.Contains("Ink"))
        shape.Remove();
}