Hi

I realise that screenshots are probably not a great idea on this mailing list 
as they appear to get stripped!
Let me try to rephrase my issue (which is probably due to a fundamental lack of 
understanding about OLE10Native objects and how they are written!) …

I need to extract OLE10Native embedded files from .doc files (CDF).  For this I 
use the approach used by the POI unit test 
org.apache.poi.poifs.filesystem.TestOle10Native.  What I find is that for some 
documents it works and for others it doesn’t.  In failure cases it throws this 
exception:

org.apache.poi.poifs.filesystem.Ole10NativeException: Invalid Ole10Native
at org.apache.poi.poifs.filesystem.Ole10Native.<init>(Ole10Native.java:167)
at 
org.apache.poi.poifs.filesystem.Ole10Native.createFromEmbeddedOleObject(Ole10Native.java:91)

Looking in the source of Ole10Native at the offending line I see:

      if (totalSize < ofs) {
          throw new Ole10NativeException("Invalid Ole10Native");
      }

Can anyone shed any light on what this means and why it happens?  As I said in 
my previous mail, if the ‘broken’ doc is saved as a docx with Word and then the 
docx is unzipped, a file called ./word/embeddings/oleObject1.bin is present 
which I assume to be the OLE10 object in the .doc file.

Thanks,

- Chris

Chris Bamford
Senior Developer
m: +44 7860 405292
p: +44 207 847 8700
w: www.mimecast.com
Address click here: www.mimecast.com/About-us/Contact-us/






Reply via email to