Sub Click(Source As Button)
Dim objWS As New notesuiworkspace
Dim obj As Variant
Set objUIdoc = objWS.currentdocument
Set obj=GetObject("c:\test.xls","Excel.sheet") 'this at least opens
Messagebox obj.name ' Here I get message: Automation object error
.
.
What I am doing wrong?
Are there BUG?
Thank you reading this :-)
I hope that you have some solution for me.
/Juha
>I've tried to use OLE automation.
>Why doesn't this code work?
>Analogical code in VB works fine, so I think that my registry is OK.
>Sub Click(Source As Button)
> Dim objWS As New notesuiworkspace
> Dim obj As Variant
> Set objUIdoc = objWS.currentdocument
> Set obj=GetObject("c:\test.xls","Excel.sheet") 'this at least opens
>
> Messagebox obj.name ' Here I get message: Automation object error
Juha, I tried this and it seemed to work fine for me.
My configuration is
Win95
Notes v4
Excel v7
I tried it on a local database; I hope that doesn't make a difference.
Larry Edelstein
Lead Programmer
SpotMedia Communications
I think one of your problems is that you have confused the LotusScript
GetObject **function** with the NotesUIDocument.GetObject **method**. The
former is used in LotusScript directly, the latter is provided as part of the
Notes Object Model. You can tell the difference between the two because the
LotusScript function takes two parameters, but the NotesUIDocument.GetObject
method takes only one.
I think you want to use the NotesUIDocument.GetObject method. Check the Release
4 help file for details.
--
Alex. Neihaus
Notes Marketing
Lotus Development Corp.