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
On Feb 6, 3:10 pm, "Ken Slovak - [MVP - Outlook]" <
[email protected]>
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
Optionshttp://
www.slovaktech.com/products.htm
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.