accessing ole object properties by their names

Ok, I asked something similar a week ago. What I actually needed is to set
some Outlook items but with using property names as strings. Like this:

MyItem['FirstName'] := ...

Mr. Bjorge Saether answered  kindly that it could be possible to access only
the methods of an object and through IDispatch interface which is designed
to give everybody not specially skilled to work with OLE a big, big
headache. :-)

So I digged through everything I could find and stumbled onto Ole2Auto unit
from RXLib (God bless them) whish has a TOleController wrapper class for
everything I needed.

I just wanted to point anyone with the same problems. This is the code that
connects a TContactItem (D5) to the first item in the Contacts folder
and changes its property "FirstName":

    OutlookApplication1.Connect;
    with OutlookApplication1.GetNamespace('MAPI') do begin
        Logon('', '', False, False);

ContactItem1.ConnectTo(GetDefaultFolder(olFolderContacts).Items.Item(1) as
ContactItem);
    end;

    OleController := TOleController.Create;
    OleController.AssignIDispatch(ContactItem1.DefaultInterface);
    OleController.SetProperty('FirstName', ['Smola']);

That's it. Thanks for listening.

--
Smola
--
"And once again, the day is saved"
(http://supersmola.tripod.com/index.htm)