From: <>
Date: 13 Jul 2006 05:22:04 -0700
Message-ID: <>


I performed the action mentioned at the end of my previous message. The good thing is that it works. The bad thing is that it exports only MS Word and MS Excel files, and the worst thing is that the Excel can't be opened in Excel 2003.
So I have tried to export it on a clean machine with MS Windows XP SP2 and only Office 97 installed. The Excel files exported here cannot be opened, too.
It is very strange for me - maybe each document from each version of Office must be extracted by the proper version. Maybe I need to get the version by reading the CLSID of the item and find the proper version in HKLM=>CLSID? Anybody else has the same problem?


Yours Sincerely,

Petr Kuchynka wrote:
> Hello,
> I have the following problem to solve:
> we have some historical data (which all must be safe, indeed) stored in
> the LONG RAW column in database. It is about 11000 files, stored in the
> mentioned LONG RAW column using Forms 6i OLE control.
> Now we want to get rid of the LONG RAW format, which is no longer
> supported in further versions. So the aim is to extract all those files
> (Office 97 to Office 2003 documents in Word, Excel, Outlook .msg files
> and exported Outlook tasks, also PDFs, images, and so on) and copy them
> to a new structure with BLOB column.
> I noticed that those files in LONG RAW cannot be simply converted,
> because the target files are encapsulated in the OLE TENANT headers.
> So the way is to extract it, the problem is how to make the process
> most automatic as possible.
> I tried the OLEXTRA library from Leonid K. It is a very good tool -
> Thanks Leonid! But just in my case, there are some problems with the
> Excel Files and the big problem is with the Outlook items extraction -
> .msg files, tasks, etc.
> I took a look on the OLE2 package from Oracle. It seems it comes with
> poor documentation, but I think this can be used somehow.
> So lets aim to the extraction using the OLE2 package. Imagine the
> situation - I have 11000 files to get extracted, so I need to do the
> job automatically.
> I have an database block that consists of 2 items, the file in LONG
> RAW, and its ID. I have an OLE Container which uses the LONG RAW and
> also an text item representing the ID. My idea is to query it and going
> to the next record in a loop. In each cycle there will be some steps to
> be done to extract the file.
> My idea is to activate the OLE server, then get the handle using
> FORMS_OLE.GET_INTERFACE_POINTER which will be pointed to the OLE
> CONTAINER I mentioned above. Then I will try to add a path and a
> filename for the file as an argument and INVOKE the object with
> FILESAVEAS and the argument above.
> I performed some tests on a machine with Office 2003 installed (maybe I
> am silly but I thought that the Office must by compatible backwards)
> but IT DOES NOTHING - like the Office ignores the FILESAVEAS.
> Has anyone the same problem or can tell me if my ideas are wrong and
> why?
> Please, point me to the right direction.
> Thank you very much for your help.
> Yours Sincerely,
> Petr Kuchynka
Received on Thu Jul 13 2006 - 14:22:04 CEST

Original text of this message