OpenOffice to Lotus Notes with OLE and UNOService

Hello,

I’m trying to set and to get data from OpenOffice Vers. 2.31 to Lotus Notes. This in combination with OLE and UnoService. I also attempt it with OpenOffice and WordPro 9.8 and with OpenOffice and Word 2003. It seems that the implementation with the IBM/Lotus products are incomplete but I’m not sure. Unfortunately all examples that I found describes the way from Lotus Notes to OpenOffice but not backwards.

Here are my trials and the results.

Sub TestNotes

’ OpenOffice to Lotus Notes 7.02

Dim oleService as Object

Dim oApp as Object

oleService = createUnoService("com.sun.star.bridge.oleautomation.Factory")

oApp = oleService.createInstance("Lotus.NotesSession")

Msgbox oApp.hasProperty("UserName") ' **** returns True and works fine ****

Msgbox oApp.hasProperty("somethingwrong") ' **** returns False and works fine ****

Msgbox oApp.UserName ' **** sends the errormessage: [automation bridge] unexpected in IUnknownWrapper_Impl:: getValue ****

Msgbox oApp.getValue("UserName") ' **** sends also the errormessage ****

End Sub

Sub WordProTest

’ OpenOffice to Lotus WordPro 9.8

Dim oleService as Object

Dim oApp as Object



oleService = createUnoService("com.sun.star.bridge.oleautomation.Factory")

oApp = oleService.createInstance("Wordpro.Application")

oApp.Visible = True

Msgbox oApp.hasMethod("newdocument") ' **** returns True and works fine ****

Msgbox oApp.hasMethod("somethingwrong") ' **** returns False and works fine ****

Msgbox oApp.Name ' **** returns True and works fine ****

oApp.newdocument("c:\temp\notestmp.lwp") ' **** no errormessage but nothing happend ****

End Sub

Sub WordTest

’ OpenOffice to MS Word 2003 < **** This example works fine **** >

Dim oleService As Object

Dim oApp as Object

Dim odoc As Object



oleService = createUnoService("com.sun.star.bridge.oleautomation.Factory")

oApp = oleService.createInstance("Word.Application")

oApp.Visible = True

odoc = oApp.Documents.Add

odoc.Range.Text = "Hello World!" 

odoc.printout

End Sub

Instead of <oleService = createUnoService(“com.sun.star.bridge.oleautomation.Factory”)> I also tried <createUnoService(“com.sun.star.bridge.OleObjectFactory”)> without difference.

Has anyone an idea?

Regards,

Sascha

Subject: These may help…

See here: http://www.johndavidhead.com/jhead/johnhead.nsf/dx/Downloads

page down, for example you’ll find…

BP215 Integration of IBM Lotus Notes 8 with IBM Lotus Symphony and OpenOffice.org

Subject: … unfortunately not

because all samples just describe the way Lotus Notes to OO (with COM/OLE). I didn’t find a working sample that explain the communication between OO and Lotus Notes with COM/OLE.

Sascha