> Look at the ResponseStatus property.
> You can compare objects easily in OutlookSpy - dipaly the item, then hit the
> CurrentItem button on the OutlookSpy toolbar and look at the properties.
>
> Dmitry Streblechenko (MVP)
http://www.dimastr.com/> OutlookSpy - Outlook, CDO
> and MAPI Developer Tool
>
> "Piyush Gupta" <indorew...[ at ]gmail.com> wrote in message
>
> news:1170834155.981038.180250[ at ]q2g2000cwa.googlegroups.com...
>
> > On Feb 6, 10:50 pm, "Dmitry Streblechenko" <dmi...[ at ]dimastr.com> wrote:
> >> Actually MessageClass will be "IPM.Task" and Class will olTask in both
> >> cases.
> >> The only difference will be the ResponseState property: it will be
> >> olTaskSimple (0) for a brand new regular task and olTaskAssign (1) for
> >> New |
> >> Task Request.
> >> You can create olTaskAssign out of olTaskSimple by calling
> >> TaskItem.Assign.
>
> >> Dmitry Streblechenko (MVP)
http://www.dimastr.com/> >> OutlookSpy - Outlook, CDO
> >> and MAPI Developer Tool
>
> >> "Piyush Gupta" <indorew...[ at ]gmail.com> wrote in message
>
> >>news:1170805481.827591.266240[ at ]l53g2000cwa.googlegroups.com...
>
> >> > On Feb 6, 3:10 pm, "Ken Slovak - [MVP - Outlook]" <kenslo...[ at ]mvps.org>
> >> > wrote:
> >> >> Sue told you. It's Inspector.CurrentItem.Class.
>
> >> >> --
> >> >> Ken Slovak
> >> >> [MVP - Outlook]
http://www.slovaktech.com> >> >> Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
> >> >> Reminder Manager, Extended Reminders, Attachment
> >> >> Options
http://www.slovaktech.com/products.htm>
> >> >> "Piyush Gupta" <indorew...[ at ]gmail.com> wrote in message
>
> >> >>news:1170802017.275721.92000[ at ]j27g2000cwj.googlegroups.com...
>
> >> >> > Thanks Sue.
>
> >> >> > That's the problem I am having, No matter if user clicks on "New >
> >> >> > Task" or "New > Task Request", inspector.CurrentItem is of TaskItem
> >> >> > type only. My C# code goes like this:
>
> >> >> > Outlook.TaskRequestItem taskRequest = inspector.CurrentItem as
> >> >> > Outlook.TaskRequestItem;
> >> >> > Outlook.TaskItem task = inspector.CurrentItem as Outlook.TaskItem;
>
> >> >> > For new Task and Task Request, taskRequest variable remains null. Is
> >> >> > there any property of TaskItem (other than TeamTask as it is always
> >> >> > false) which can tell me the option selected by user?
>
> >> > Sorry for the confusion. As I am writing C# code, Class property of
> >> > CurrentItem can't be used without casting it to some type and that's
> >> > why I am type casting it to TaskItem and TaskItem.Class always returns
> >> > IPM.Task. When I type cast it to TaskRequestItem, it returns null.
>
> > Thanks Dmitry, your suggestion worked and now I am able to
> > differentiate between Task and Task Request.
>
> > Can you pls. suggest way to differentiate between Appointment and
> > Meeting Request too? Similar to Task problem, I am getting
> > IPM.Appointment class in both cases.