OO contra MS Word as OLE Servers, OLE Server problems
Posted: Fri Feb 22, 2008 2:16 pm
This is my first post here, so please tell me if I'm in breach of the rules, apologies in advance! One of my clients wants to move 60 users from MS Office, MSO, to OO. I think this is a correct strategy and very interesting! This post does not concern "in application" questions, though. Please don't interpret my questions as an issue as to make OLE work within OO. I hope that what I write below is clear enough.
Background
There is a Database Client Software written for Windows 2000/XP/Vista that stores documents as OLE objects. The outline of what happens in this "document handling scheme" is that a file (often a temporary one) is picked up by the Windows software and put into a temporary OLE Container. The Container then streams the OLE Object to the database.
When a user wants to view a document there is a tiny piece of MS Office automation that marks the retrieved document as read only with DoVerb(ovShow). If the user wants to edit the document the "row" in the database containing the BLOB is locked and the OLE Container is called with DoVerb(ovPrimary).
This works nicely with MS Office, PDF (Adobe Acrobat and/or Reader, only in read-only mode) and some other OLE Server capable software.
Problem(s)
1. On a Windows machine where MS Office was never installed, the OLE Container raises an exception "Class not registered". This is because an OLE Object actually does not have a filename, but an application class "tag".
2. When MS Word is the OLE Server, if the user moves to another record the OLE Container is streamed back to the database (if in edit mode) and the Container is destroyed. Just before this OleSave is called and both Word and Excel takes care to save the changes. With OO even if we successfully stored the document, OO does not seem to react to the calls made to the OLE Container.
Questions
1. Is it be possible, as is when working from the filesystem, to let OO "kick in" or "take over" the class registration from Word, so that stored .doc-objects can be viewed and edited in OO instead of MS? I have fiddled with the setting in Load/Save to no avail.
2. Why does Write not display a "Update" option in the Archive menu like other OLE Servers when editing a document that is opened from an OLE Container? And why does it not react to the OleSave call (Win API)?
More information
Tests have been made with OpenOffice 2.3.0 Novell Edition.
A document saved/created on a machine win Office installed:
- Can be safely and fully managed by Word
- Will raise an exception on a machine without MSO with OO installed.
A document saved/created on a machine with OO installed:
- Can be opened and read with Word if installed, but will be stored and readas a temporary DOC-file and thus not safe to edit
- Can be opened and read with OO Write if installed, but will be stored and read as a temporary DOC-file and thus not safe to edit
The OLE Container is based on the VCL wrapper for Windows API, CodeGear Delphi for Win32 2007.
When the applications report engine creates an RTF document it seems to be correctly opened and streamed to the database via the OLE Container on an machine with OO alone, but it might be Write or Windows managing that alone.
Any information will be highly appreciated as a total re-write of the document handling functionality will render the saving the client intends to make void. The client is an NGO working with subsidiary projects, a non-profit organisation, that is.
Regards,
/Dany
Background
There is a Database Client Software written for Windows 2000/XP/Vista that stores documents as OLE objects. The outline of what happens in this "document handling scheme" is that a file (often a temporary one) is picked up by the Windows software and put into a temporary OLE Container. The Container then streams the OLE Object to the database.
When a user wants to view a document there is a tiny piece of MS Office automation that marks the retrieved document as read only with DoVerb(ovShow). If the user wants to edit the document the "row" in the database containing the BLOB is locked and the OLE Container is called with DoVerb(ovPrimary).
This works nicely with MS Office, PDF (Adobe Acrobat and/or Reader, only in read-only mode) and some other OLE Server capable software.
Problem(s)
1. On a Windows machine where MS Office was never installed, the OLE Container raises an exception "Class not registered". This is because an OLE Object actually does not have a filename, but an application class "tag".
2. When MS Word is the OLE Server, if the user moves to another record the OLE Container is streamed back to the database (if in edit mode) and the Container is destroyed. Just before this OleSave is called and both Word and Excel takes care to save the changes. With OO even if we successfully stored the document, OO does not seem to react to the calls made to the OLE Container.
Questions
1. Is it be possible, as is when working from the filesystem, to let OO "kick in" or "take over" the class registration from Word, so that stored .doc-objects can be viewed and edited in OO instead of MS? I have fiddled with the setting in Load/Save to no avail.
2. Why does Write not display a "Update" option in the Archive menu like other OLE Servers when editing a document that is opened from an OLE Container? And why does it not react to the OleSave call (Win API)?
More information
Tests have been made with OpenOffice 2.3.0 Novell Edition.
A document saved/created on a machine win Office installed:
- Can be safely and fully managed by Word
- Will raise an exception on a machine without MSO with OO installed.
A document saved/created on a machine with OO installed:
- Can be opened and read with Word if installed, but will be stored and readas a temporary DOC-file and thus not safe to edit
- Can be opened and read with OO Write if installed, but will be stored and read as a temporary DOC-file and thus not safe to edit
The OLE Container is based on the VCL wrapper for Windows API, CodeGear Delphi for Win32 2007.
When the applications report engine creates an RTF document it seems to be correctly opened and streamed to the database via the OLE Container on an machine with OO alone, but it might be Write or Windows managing that alone.
Any information will be highly appreciated as a total re-write of the document handling functionality will render the saving the client intends to make void. The client is an NGO working with subsidiary projects, a non-profit organisation, that is.
Regards,
/Dany