Accessing custom items using Outlook API and .net

Y

ylarom

Hi


I have a C# program that scans Outlook items using the Outlook API.
To handle the different types of items I use a kind of switch:


if (oItem is Outlook.DocumentItem) ...
else if (oItem is Outlook.MailItem) ...
else if (oItem is Outlook.AppointmentItem) ...


The thing is I think I may be losing custom forms.


I take it there may be two kinds of custom items:
1. Derived from basic types, for example IPM.Contact.Employee
2. 'All-Custom', for exmample, IPM.AntiVirus


Is there a way to handle these by the Outlook API, or will I have to
resort to using CDO/MAPI?


Thanks
 
S

Sue Mosher [MVP-Outlook]

Type #1 would be handled by your existing code.

Type #2 are quite rare these days and could be handled with a last Else block. I'm not sure what object type they'd report. I haven't seen one in years.
--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
Y

ylarom

Thanks Sue,

I estimate the problem is with #2 items. The question is how can I get
their properties, like subject, creation date etc., and especially
properties I'm not aware of right now.
More to the point: is there a Outlook API equivalent way of
interrogating the item to get field name/value pairs without using MAPI?
 
S

Sue Mosher [MVP-Outlook]

ItemProperties, but of course, you'll first need to determine what kind of basic item it is before you can write code for it.
--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
Y

ylarom

Aye, there's the rub...
There doesn't seem to be a common interface like IMessage in Outlook
that will expose just ItemProperties... Can IDispatch be used to do it
somehow?
 
S

Sue Mosher [MVP-Outlook]

I have no idea. I'm just a humble VB/VB.NET programmer.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top