Hi Team,
I am using Aspose word 19.6 Java.
I am trying to extract attachment name from the Icon caption using following code:
Document doc = new Document(docxFile.getAbsolutePath()); // docxFile is the docx File object.
NodeCollection<Shape> shapes = (NodeCollection<Shape>) doc.getChildNodes(NodeType.SHAPE, true);
OleFormat tempOleFormatRef = null;
for (Shape shape : shapes)
{
tempOleFormatRef = shape.getOleFormat();
if ( tempOleFormatRef != null){
String fileName = tempOleFormatRef.getIconCaption();// Getting exception here!!!
}
}
At the mentioned exception line getting follwoing exception:
java.lang.IndexOutOfBoundsException: Index: 3, Size: 1
Please provide your into on it and also please suggest if there is any other better way to get attachment name via icon caption or any other means.
Sample docx attached below:
test.zip (221.5 KB)
Thanks