Hi, Sometimes convertBytesToShort is called with a null-array it seems. Sample code: WordDocument wd = new WordDocument("d:/testme2.doc"); StringWriter sw = new StringWriter(); wd.writeAllText(sw); System.out.println(sw.toString()); Checking for a null-array and then returning a 0 seems to help. I'll try to attach the document. Regards, Jeroen
Created attachment 5885 [details] Word doc for testing nullpointer exception poi/hfd
Move to HWPF