[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Re: RubyCOM and Lotus Notes

marcus

12/10/2004 4:03:00 PM

Hi. I know this is more than 2 years old, but for some of us, this may
prove useful. When I query 'COM' in this group, I mainly get results
of how to use COM to access Ruby classes, although most of us I think
want to do the opposite (use Ruby, say to access Lotus Notes).

I finally found a post that said "WIN32OLE.new" is the rough equivalent
of CreateObject. While the pickaxe book does use WIN32OLE.new, perhaps
the 3rd edition could point that out for us new to Ruby struggling with
CreateObject.

So, here is the answer to it:

require 'win32ole'

session = WIN32OLE.new("Notes.NotesSession")
puts session.UserName
notesdb = session.GetDatabase("servername", "database.nsf")
puts notesdb.Title
I sure hope this helps someone out there as I'm new to Ruby as well.