The Notes productivity editors just got a heap more interesting
First a bit of history. When Star Office was first released and OpenOffice.org started it was under dual licenses, the SISSL and the LGPL. IBM took a fork and kept their changes private as they are permitted to do under the SISSL. In September 2005 (after the IBM fork) OpenOffice.org retired the SISSL and OOo releases after that are LGPL only. If IBM wanted to freshen their codebase then they would have to comply with the LGPL which means releasing their changes, which might have been a problem. I don’t know exactly the nature of the changes, but at the time they were definitely taking advantage specifically of the SISSL license not the LGPL.
IBM had two choices, carry on developing their fork on their own (they are quite capable of doing this using their rather large and skilled development teams in China plus the Smartsuite team in India) or comply with the LGPL and join the OpenOffice.org community. I wasn’t sure which way they would jump, so privately I was a bit skeptical of the productivity editors, I figured if they were going to go it alone then despite their efforts it would be a bit of a dead end product because an open development process tends to lead to a better product. However, today IBM jumped. They jumped the right way and joined the OpenOffice.org community. IBM will contribute code to OpenOffice.org and they can use OpenOffice.org to keep the productivity editors in Notes fully ODF compliant and with a common API so that code written to automate OpenOffice.org will also run in the Productivity Editors. Now you may be wondering about that last bit - surely there isn’t an automation API for the Productivity Editors? Well yes there is, it is called UNO and here is how you turn it on. . .
In Windows (I haven’t figured it out in Linux yet) open regedit
go to the key:
HKEY_CLASSES_ROOT\CLSID\{82154420-0FBF-11d4-8313-005004526AB4}\LocalServer32
change the value to:
C:\Program Files\lotus\notes\framework\shared\eclipse\plugins\com.ibm.productivity.tools.base.app.win32_3.0.0.20070725-1652\soffice.exe -nodefault -nologo
This assumes that you have that registry key already (you will if you have installed OpenOffice.org, you might just have to create it if you don’t - haven’t tested that)
I am also assuming you have notes installed in the default location.
Interesting thing to note: there is a file called soffice.exe within the Notes8 install.
So what has this done? Well, 82154420-0FBF-11d4-8313-005004526AB4 is the guid of com.sun.star.servicemanager and this is the class at the top of the UNO automation API. Kind of analagous to notessession.
Lets start using our new API, create a button in Notes with this Lotusscript code in it:
Sub Click(Source As Button)
Set SM=CreateObject("com.sun.star.ServiceManager")
Set Desktop=SM.createInstance("com.sun.star.frame.Desktop")
Dim args()
Set WriterApplication=Desktop.loadComponentFromURL("private:factory/swriter","_blank",0,args)
Set WriterText=WriterApplication.getText()
Set Cursor=WriterText.createTextCursor()
Call WriterText.insertString(Cursor,"Hello World!",False)
End Sub
That should open the Notes 8 wordprocessor and type in “Hello World!” (if you get an error “can’t create automation object” sometimes it helps if an editor has already been launched.)
The API is very well documented, go to api.openoffice.org and take a look round.
This is a totally unsupported hack, if you use it in production don’t call IBM for help. You can contact me for help if you like, but I may ask you to cross my palm with silver.

September 10th, 2007 at 2:35 pm
Fun hack Alan … but there is some good news coming VERY soon about this being supported in a near future release
September 10th, 2007 at 4:23 pm
no harm in getting the scoop though is there!
September 10th, 2007 at 10:52 pm
If OpenOffice is not installed you have to create several registry keys, see here for details.
The sample from John D. Head blog demonstrates Notes / OOo integration which also works with Notes productivity editors.
September 10th, 2007 at 11:02 pm
Hi Alexis, thanks for the link to the first presentation, very interesting. As for BP204 at Lotusphere, I co-presented that session with John Head, and I wrote the BP204.nsf sample database
the code in this blog post is example 1 from the bp204.nsf database.
September 10th, 2007 at 11:29 pm
I should have looked better at the firsts slides
For people who doesn’t have OpenOffice installed you’ll find below the reg file I used (not sure if all the keys are mandatory so use at your own risks).
You won’t have to manually create each key as I did (change LocalServer32 key according to your Lotus path)
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\CLSID\{82154420-0FBF-11d4-8313-005004526AB4}]
“AppID”=”{82154420-0FBF-11d4-8313-005004526AB4}”
@=”StarOffice Service Manager (Ver 1.0)”
[HKEY_CLASSES_ROOT\CLSID\{82154420-0FBF-11d4-8313-005004526AB4}\LocalServer32]
@=”C:\\Program Files\\lotus\\notes\\framework\\shared\\eclipse\\plugins\\com.ibm.productivity.tools.base.app.win32_3.0.0.20070725-1652\\soffice.exe -nodefault -nologo”
[HKEY_CLASSES_ROOT\CLSID\{82154420-0FBF-11d4-8313-005004526AB4}\NotInsertable]
[HKEY_CLASSES_ROOT\CLSID\{82154420-0FBF-11d4-8313-005004526AB4}\ProgIDcom.sun.star.ServiceManager.1]
@=”com.sun.star.ServiceManager.1″
[HKEY_CLASSES_ROOT\CLSID\{82154420-0FBF-11d4-8313-005004526AB4}\Programmable]
[HKEY_CLASSES_ROOT\CLSID\{82154420-0FBF-11d4-8313-005004526AB4}\VersionIndependentProgIP]
@=”com.sun.star.ServiceManager”
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{82154420-0FBF-11d4-8313-005004526AB4}]
“AppID”=”{82154420-0FBF-11d4-8313-005004526AB4}”
@=”StarOffice Service Manager (Ver 1.0)”
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{82154420-0FBF-11d4-8313-005004526AB4}\LocalServer32]
@=”C:\\Program Files\\lotus\\notes\\framework\\shared\\eclipse\\plugins\\com.ibm.productivity.tools.base.app.win32_3.0.0.20070725-1652\\soffice.exe -nodefault -nologo”
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{82154420-0FBF-11d4-8313-005004526AB4}\NotInsertable]
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{82154420-0FBF-11d4-8313-005004526AB4}\ProgIDcom.sun.star.ServiceManager.1]
@=”com.sun.star.ServiceManager.1″
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{82154420-0FBF-11d4-8313-005004526AB4}\Programmable]
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{82154420-0FBF-11d4-8313-005004526AB4}\VersionIndependentProgIP]
@=”com.sun.star.ServiceManager”
[HKEY_CLASSES_ROOT\com.sun.star.ServiceManager]
@=”StarOffice Service Manager”
[HKEY_CLASSES_ROOT\com.sun.star.ServiceManager\CLSID]
@=”{82154420-0FBF-11d4-8313-005004526AB4}”
[HKEY_CLASSES_ROOT\com.sun.star.ServiceManager\CurVer]
@=”com.sun.star.ServiceManager.1″
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\com.sun.star.ServiceManager]
@=”StarOffice Service Manager”
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\com.sun.star.ServiceManager\CLSID]
@=”{82154420-0FBF-11d4-8313-005004526AB4}”
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\com.sun.star.ServiceManager\CurVer]
@=”com.sun.star.ServiceManager.1″
[HKEY_CLASSES_ROOT\com.sun.star.ServiceManager.1]
@=”StarOffice Service Manager (Ver1.0)”
[HKEY_CLASSES_ROOT\com.sun.star.ServiceManager.1\CLSID]
@=”{82154420-0FBF-11d4-8313-005004526AB4}”
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\com.sun.star.ServiceManager.1]
@=”StarOffice Service Manager (Ver1.0)”
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\com.sun.star.ServiceManager.1\CLSID]
@=”{82154420-0FBF-11d4-8313-005004526AB4}”
Thanks for the slides and samples, I hope we’ll have more integration samples by Lotusphere 2008.
September 10th, 2007 at 11:32 pm
Nice one Alan