none
Is there a way to get task information from a task request in your inbox that has not been accepted? RRS feed

  • Question

  • I have task requests in my inbox and would like to access the information such as duedate and delegator of the taskrequests that have not yet been accepted. I tried getassociatedtask but it either doesnt get all of the taskrequests I want, or gets them all but adds some to my task list (which I dont want), depending on the boolean value you give it.
    Wednesday, October 17, 2012 2:17 PM

Answers

  • You can access most properties using PropertyAccessor. Do yo usee the properties in OutlookSpy (click IMessage button)?

    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 Wednesday, October 17, 2012 5:27 PM
    Wednesday, October 17, 2012 4:41 PM

All replies

  • You can access most properties using PropertyAccessor. Do yo usee the properties in OutlookSpy (click IMessage button)?

    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 Wednesday, October 17, 2012 5:27 PM
    Wednesday, October 17, 2012 4:41 PM
  • Thanks! This seems to be the closest solution to what I'm looking for. DueDate isn't listed as a property, however the property tag "PR_BODY_W" contains text for the DueDate, Category, Body, etc, I just have to parse the text is returns.

    EDIT: I seem to be getting an exception with this line when trying to access the

    taskrequestItem.PropertyAccessor.GetProperty("http://schemas.microsoft.com/mapi/proptag/0x1000001F")

    The exception is: The property "http://schemas.microsoft.com/mapi/proptag/0x1000001F" does not support this operation.

    Is there no way to view that then?


    • Edited by becksftw Wednesday, October 17, 2012 5:41 PM
    Wednesday, October 17, 2012 5:27 PM
  • Why do you access the body using PropertyAccessor? Why not use the Body property?

    That being said, do not parse the message body, it is very unrealiable.

    The task itself is stored as an embedded attachment (look at it with OutlookSpy - click IMessage button and go to the GetAttachmentTable tab). You can save it as an MSG file using Attachment.SaveAsFile. You can then open the MSG file using Namespace.GetSharedItem, but that will create the task (which you are trying to avoid) in the primary store.

    You can work around that using Redemption - it returns the embedded message using RDOAttachment.EmbeddedMsg (you will get back RDOTaskItem object).


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

    Wednesday, October 17, 2012 8:44 PM
  • Ah yes, I forgot you can directly access the body. I will try redemption, it sounds like that is exactly what I'm looking for. Does redemption also provide a means for me to accept a task request programmatically from the taskrequestitem object? I can't seem to find out how to do that.
    Friday, October 19, 2012 3:33 PM
  • Sure, both OOM and Redemption allow that - use TaskItem.Respond or RDOTaskItem.Respond respectively.

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

    Friday, October 19, 2012 8:21 PM
  • Would I get the attached rdotaskitem like this?

    Dim attachment As redemption.rdoattachment = Nothing
    Dim taskrequest As redemption.rdotaskrequest = Nothing
    Dim taskitem As redemption.rdotaskitem = Nothing
    
    ...code to get taskrequest
    
    attachment =taskrequest.attachments
    taskitem = attatchment.embeddedMSG


    • Edited by becksftw Friday, October 19, 2012 9:14 PM
    Friday, October 19, 2012 9:14 PM
  • No, you will need to retrieve the attachment from the Attachments collection:

    attachments =taskrequest.attachments

    if (attachments.Count > 0) Then

      attachment = attachments.Item(1)
      taskitem
    = attachment.embeddedMSG


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

    Tuesday, October 23, 2012 4:12 PM
  • I ended up doing just that, however the problem I am now having is how do I get the taskrequests in my inbox returned to me as an RDOtaskrequestitem as oppose to a taskrequestitem, otherwise I get an invalid cast exception.
    Tuesday, October 23, 2012 5:38 PM
  • Why can't you use the RDOTaskRequestItem object?

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

    Tuesday, October 23, 2012 7:01 PM