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

Free Support Forum - aspose.com

FileCorruptedException and IndexOutOfBoundsException: ticks when opening a document template


Aspose.Words throws a FileCorruptedException (stacktrace attached) when we are trying to open the file filenote.dot (word template, attached).
We can open, edit, save and print this template and based documents with the ordinary MS Word versions (2000, mac 2008) and do not encounter any problems.
Even when we delete all the content in this document, the exception is still thrown when we open it with Aspose.Words.jdk14-2.6.0.

Our code (ContactActivityService.java:287):

String absolutePathToFile = "c:/filenote.dot";
Document doc = new Document(absolutePathToFile);

Any hints would be appreciated.


Jan Haensli

Thanks for your request. I managed to reproduce the problem on my side and created new issue #7237 in our defect database. I will notify you as soon as it is fixed.
Best regards.

Hi Alexey

Thanks for your quick reply.
We are facing the go live of our software containing Aspose.Words in the next days.
Are you aware of a workaround e.g. can we change the word template in a way (workaround) to avoid the exceptions until a fix is available?

Best regards


Thanks for your request. You can try open/save your template using MS Word. After such roundtrip, I can successfully open the document.
Best regards.

Hi Alexey

We have tried to open/save the template with the following versions:
MS Word 2000
MS Word 2003
mac MS Word 2007

But no luck. Aspose.Words does still throw the FileCorruptedException.

Which version did you use to “repair” the template?

Best regards


Thanks for your request. I used MS Word 2003. You can try saving your document as DOC file (not DOT) and use it as a template.
Best regards.

We have published new version of Aspose.Words for java. This version contains fix of issue #7237 you have reported earlier.
You can download new version from here: