PC Review


Reply
Thread Tools Rate Thread

Accessing custom items using Outlook API and .net

 
 
ylarom@gmail.com
Guest
Posts: n/a
 
      11th Oct 2005
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

 
Reply With Quote
 
 
 
 
Sue Mosher [MVP-Outlook]
Guest
Posts: n/a
 
      11th Oct 2005
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
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx


<(E-Mail Removed)> wrote in message news:(E-Mail Removed)...
> 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
>

 
Reply With Quote
 
ylarom@gmail.com
Guest
Posts: n/a
 
      11th Oct 2005
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?

 
Reply With Quote
 
Sue Mosher [MVP-Outlook]
Guest
Posts: n/a
 
      11th Oct 2005
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
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx


<(E-Mail Removed)> wrote in message news:(E-Mail Removed)...
> 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?
>

 
Reply With Quote
 
ylarom@gmail.com
Guest
Posts: n/a
 
      11th Oct 2005
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?

 
Reply With Quote
 
Sue Mosher [MVP-Outlook]
Guest
Posts: n/a
 
      11th Oct 2005
I have no idea. I'm just a humble VB/VB.NET programmer.

--
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


<(E-Mail Removed)> wrote in message news:(E-Mail Removed)...
> 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?
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Accessing custom fields in Outlook with VBA netnews.comcast.net Microsoft Outlook VBA Programming 0 19th Oct 2006 06:50 PM
Accessing custom items using Outlook API and .net ylarom@gmail.com Microsoft Outlook 1 11th Oct 2005 05:40 PM
Accessing Outlook Express Inbox/Sent Items Van Microsoft Outlook Discussion 2 22nd Sep 2003 02:41 PM
How do you suppress the warning messages in Outlook when an application is programatically accessing the items using the Outlook Object Model Gary Microsoft Outlook VBA Programming 0 12th Sep 2003 11:00 PM
Re: outlook crashes when accessing deleted items DL Microsoft Outlook 0 28th Jul 2003 08:25 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:17 PM.