Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Outlook / Interop / October 2005

Tip: Looking for answers? Try searching our database.

Accessing custom items using Outlook API and .net

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
ylarom@gmail.com - 11 Oct 2005 17:09 GMT
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
Sue Mosher [MVP-Outlook] - 11 Oct 2005 17:28 GMT
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.
Signature

Sue Mosher, Outlook MVP
  Author of Configuring Microsoft Outlook 2003
    http://www.turtleflock.com/olconfig/index.htm
  and Microsoft Outlook Programming - Jumpstart for
    Administrators, Power Users, and Developers
    http://www.outlookcode.com/jumpstart.aspx

> Hi
>
[quoted text clipped - 15 lines]
>
> Thanks
ylarom@gmail.com - 11 Oct 2005 20:02 GMT
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?
Sue Mosher [MVP-Outlook] - 11 Oct 2005 20:43 GMT
ItemProperties, but of course, you'll first need to determine what kind of basic item it is before you can write code for it.
Signature

Sue Mosher, Outlook MVP
  Author of Configuring Microsoft Outlook 2003
    http://www.turtleflock.com/olconfig/index.htm
  and Microsoft Outlook Programming - Jumpstart for
    Administrators, Power Users, and Developers
    http://www.outlookcode.com/jumpstart.aspx

> Thanks Sue,
>
[quoted text clipped - 3 lines]
> More to the point: is there a Outlook API equivalent way of
> interrogating the item to get field name/value pairs without using MAPI?
ylarom@gmail.com - 11 Oct 2005 21:29 GMT
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?
Sue Mosher [MVP-Outlook] - 11 Oct 2005 21:47 GMT
I have no idea. I'm just a humble VB/VB.NET programmer.

Signature

Sue Mosher, Outlook MVP
  Author of Configuring Microsoft Outlook 2003
    http://www.turtleflock.com/olconfig/index.htm
  and Microsoft Outlook Programming - Jumpstart for
    Administrators, Power Users, and Developers
    http://www.outlookcode.com/jumpstart.aspx

> 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?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.