Anyway to determine is an 'Item' is an mail or Task, Meeting item.

D

Dan

I am trying to create a program that keeps track of open emails. I was
playing around with the Inspector object and can fire off events whenever I
open an email. But how do I determine if the item is an actuall email?

ie.

if(item is mailitem)
.. process item as an email.

also,

How so I cast the Item to an email, so I can access information about thet
email? I am really looking for a way to identify the emails, and track them
so that I coudl close Outlook, and then re-open Outlook and press a button to
re-open the emails.

I am new to Office programming and need a little direction :)

Thanks,

Dan
 
V

Vladimir Chtchetkine

If you're in C++ realm you can always query the object for IID__MailItem
interface. And if query fails then the item is not a mail item.
 
Top