MicroSoft Word 2007 default saving in docx format:
http://msdn2.microsoft.com/en-us/library/bb266220.aspx
Working on a kludgy solution for sites with mixed MicroSoft Office versions. If it might be useful, please provide feedback. forum -March 2008
Looks like it's going to be a problem for sites with mixed MicroSoft Office versions. When Portal/J executes on a PC with MicroSoft Word 2007, new embedded objects appear to be saved in docx format wrapped in an OLE. TIDOBLOK.OLE_OBJECT_CLASS = Word.Document.12. TIDBLOB.OLE_OBJECT_TYPE = b.
Side note: Word 2007 files are saved in "MicroSoft Open Office XML Format" with file extension docx. They can be renamed by adding extension ".zip" and WinZip can be used to see their content.
The PassPort object (contents of TIDBLOB) can be read out of the database and into a file (use OleTypeBRead.java with a minor modification).
There are a couple of things that can be done with the file.
1. Rename the file with extension ".docx" and Word 2007 complains, but will open it. Word 2007 is probably complaining about the OLE definition which it seems to ignore.
2. Open the file with a hex editor like UltraEdit. Delete all data:
a) before "PK" (zip file magic number) following a bunch of xFF's or x00's.
b) after the last occurence of "PK" plus 20 bytes.
Save the file and rename the file with extension ".docx". It is now a Word 2007 file.
For Portal/J 10.0.3 and 10.0.7, there does not appear to be any way that a previous version of MicroSoft Office can open embedded objects created by Office 2007. Even with the Compatibility Pack installed and user prompt "Convert file from" containing "Word 2007", it fails with Word popping message: "There was an error opening the file." and Portal/J hangs.
It appears MicroSoft's intent is that older versions of Word will be forward compatible with Word 2007. This forward compatibility works when Word 2007 creates a document and an older version opens the ".docx" file with Word prompting with a drop down list of formats including Word 2007. PassPort not involved.
When PassPort is involved, that is Word invoked by Portal/J is attempting to open an embedded object, the older versions of Word, even with "Word 2007" being a valid possible format, cannot open a Word 2007 object. The most likely problem is the MicroSoft compatibility pack cannot be correctly invoked. The good news is that Word 2007 embedded objects can be opened by Portal/J version 10.0.3 when it is executing on a PC with Word 2007.
A possible solution is to use Portal/J settings to force embedded documents into OLE format (as opposed to "docx" and "xlsx") in the Portal/J Administration, Configure Passport Regions, Edit Server Definitions (can also do Global), select the server, Define Param...
Application Name: RichText, Parameter Value: Word.Document.8.
Application Name: SpreadSheet, Parameter Value: Excell.Sheet.8.
Pro: Consistent embedded objects as OLEs. Mixed MicroSoft Office's on client machines will work.
Con: Users cannot use new Office 2007 features. They are warned upon saving their document that features will be lost.
Linked Word 2007 objects work. TIDOBLOK.OLE_OBJECT_CLASS = Word.Document.12. TIDBLOB.OLE_OBJECT_TYPE = b. TIDBLOB.OLE_OBJECT_BLOB is an OLE link.
Side Note: An OLE icon on a PassPort panel is used for one document type (word processor, spreadsheet, others) and is defined within the panel sym and changed via Analyst Work Bench.