Q:

Extract embedded files from doc using java

I am using the poi library to deal with the MS files. To extract the embedded ole object for docx, xlsx and pptx, I use method:PackagePart pp = src.getAllEmbedds() But for the old format of MS files like doc, xls and ppt, there is no such method. So I am using the extractor: POITextExtractor[] embeddedExtractors =
                ExtractorFactory.getEmbededDocsTextExtractors(oleTextExtractor); But this can only extract the text not the whole file.
Can anyone help me with extracting doc, ppt and xls files?

A:

OLE2 files include most Microsoft Office files such as XLS, DOC, and PPT as well as MFC serialization API based file formats. Office OpenXML Format is the new standards based XML file format found in Microsoft Office 2007 and 2008. This includes XLSX, DOCX and PPTX.
For each MS Office application there exists a component module that attempts to provide a common high level Java api to both OLE2 and OOXML document formats.
See

Apache POI - POIFS - Documents embeded in other documents
Busy Developers' Guide to HSLF drawing layer
How to extract misc embedded data from a ppt file

