none
Categories property for task requests in Inbox is blank, even after removing the strip categories rule RRS feed

  • Question

  • I'm sending tasks with category "x". I've turned off the rule on outlook that strips categories from incoming messages. When I view a task request in my inbox it then shows the email message to the right w/ the accept/decline buttons AND it shows the category I send it with. Also, when I parse my inbox and look for taskrequestitems with category "x" these task requests get picked up. However, when I use outlook spy and look at the categories property it shows nothing. Does anyone know what the cause of this may be?
    Thursday, January 31, 2013 2:38 PM

Answers

  • You can try to set the Category in the Application.ItemSend event - it is the only chance to touch the TaskRequest object when it goes out.

    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.4 is now available!

    • Marked as answer by becksftw Thursday, January 31, 2013 11:42 PM
    Thursday, January 31, 2013 6:36 PM

All replies

  • if you look at the attachment table in outlookspy for that item - is there any attachment?
    Thursday, January 31, 2013 2:44 PM
  • Do you see the same data if you open the IMessage object from the IMAPIFolder | GetContentsTable tab instead of clicking IMessage button?

    Keep in mind that eeh actual task is stored as an embedded message attachment. What do you see if you go to the GetAttachmentTable tab, select PR_ATTACH_DATA_OBJ property, right click, select IMAPIProp::OpenProperty, select IID_IMessage?


    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.4 is now available!

    • Proposed as answer by DamianD Thursday, January 31, 2013 3:36 PM
    Thursday, January 31, 2013 2:46 PM
  • The categories property only seems to show when I click "Item", and doesn't show for "IMessage". When I go to GetAttachmentTable tab, select PR_ATTACH_DATA_OBJ property, right click, select IMAPIProp::OpenProperty, then select IID_IMessage the category shows up under "PidNameKeywords" in the GetProps tab.
    Thursday, January 31, 2013 3:30 PM
  • That makes sense - Outlook actually looks at the task stored as an attachment. The actual task request only exposes a bare minimum of properties.

    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.4 is now available!

    Thursday, January 31, 2013 3:35 PM
  • And that is what Categories are - Keywords, so Dmitry solved your issue.
    Thursday, January 31, 2013 3:36 PM
  • Is there any way to change my filter query to look for this? Right now I'm using filter = """urn:schemas-microsoft-com:office:office#Keywords"" <> '" & ttd & "'"

    Or, would I be able to do something when I send the task request (I'm doing this programmatically) to make the category show up for the task request as well?

    Thursday, January 31, 2013 3:49 PM
  • You can try to set the Category in the Application.ItemSend event - it is the only chance to touch the TaskRequest object when it goes out.

    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.4 is now available!

    • Marked as answer by becksftw Thursday, January 31, 2013 11:42 PM
    Thursday, January 31, 2013 6:36 PM
  • You can try to set the Category in the Application.ItemSend event - it is the only chance to touch the TaskRequest object when it goes out.

    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.4 is now available!

    This worked, thank you!
    Thursday, January 31, 2013 11:43 PM