RDO objects and C#
- From: dskwarek@xxxxxxxxx
- Date: Mon, 08 Oct 2007 09:05:19 -0700
I'm testing Outlook Redemption component (4.4.0.714) with C# project.
I have problem with creating of RDO instances.
I'm using Visual Studio 2005.
I added Redemption component to my project using
AddReference -> COM -> Redemption Outlook Library 4.4.
I tried to create instance of RDOContactItemClass.
RDOSessionClass session = new RDOSessionClass();
session.Logon("", "", false, false, null, false);
RDOFolder folder =
session.GetDefaultFolder(rdoDefaultFolders.olFolderContacts);
IRDOMail item = folder.Items.Add("IPM.Contact");
RDOContactItem contact = item as RDOContactItem; // NULL !!!
Method Items.Add returns instance which implements RDOMail interface.
I've found in Outlook Redemption documentation that RDOContactItem is
derived from the RDOMail object.
There isn't true for interop assembly created by Visual Studio.
RDOContactItem is interface and implements IRDOContactItem which
implements IRDOMail.
Visual Studio creates RDOContactItemClass which implements
RDOContactItem and IRDOContactItem.
There is no RDOMail in inheritance hierarchy of RDOContactItem.
How to add new instance of RDOContactItemClass to RDOItems collection
?
Using Items.Add method I can create only instance of RDOMailClass.
What am I doing wrong ?
.
- Follow-Ups:
- Re: RDO objects and C#
- From: Ken Slovak - [MVP - Outlook]
- Re: RDO objects and C#
- Prev by Date: How to clear birthday events in the calendar without deleting birthday field data in the contacts?
- Next by Date: Re: RDO objects and C#
- Previous by thread: How to clear birthday events in the calendar without deleting birthday field data in the contacts?
- Next by thread: Re: RDO objects and C#
- Index(es):
Relevant Pages
|
Loading