Use case:
From code I have to access msaccess which stores several files wrapped into an oleobject.I have to extract the raw files and save it to the filesystem.We dont know the wrapped file type in advance.
I dug myself into this topic and have come across some 'semi-solution' like these:
Extract OLE Object (Word document) from MS Access
http://www.douglaspasqua.com/2013/01/24/java-remove-ole-headers-from-images-stored-as-ole-objects-in-access-database/
How to remove junk characters while reading a word document stored in 'OLE Object' field in an access database through C#?
Unfortunately the solutions above wont work for several reason:
1.We dont know the file type in advance so we are not able to remove OLE headers ,which are based on type of the file. But to get know the filetype we have to remove the OLE header. Trap-22.
2.We dont know the set of filetypes that can appear (it could be pdf,docx,doc,jpg....any). So we are unable to test the OLE removal for finite set of type(say only for docx,docx,jpg) and keep the good one.