none
TaskItem ResponseState does not change RRS feed

  • Question

  • Hi,

    I have requirement where I have to track the Task as assigned,accepted and mark complete.

    I have added event as follows:

     private void ThisAddIn_Startup(object sender, System.EventArgs e)
            {
                MessageBox.Show("Loaded");
                inspectors = this.Application.Inspectors;
                //inspectors.NewInspector += Inspectors_NewInspector;
                Outlook.MAPIFolder outlookTasksFolder = Application.Session.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderTasks);
                outItems = outlookTasksFolder.Items;
                outItems.ItemChange += OutItems_ItemChange1;
                outItems.ItemAdd += OutItems_ItemAdd;
            }

    So ,Itemadd and Itemchanged event gets triggered ,when we assign a task,accept a task.

    But whenever I try to get the ResponseState of Outlook.TaskItem,it is always default one,it does not get changed.

    Is this a bug?

    Any help will be appreciated.

    Thanks,

    Vinod

    Thursday, July 27, 2017 9:02 AM

All replies

  • Hi AgentVinod86,

    I could reproduce your issue. We are investigating the property too. Thanks for patient waiting. By the way, could I know what do you want to do via the ResponseState?

    Best Regards,

    Terry

    Monday, July 31, 2017 10:13 AM
  • You can use the _TaskItem.Complete property to track task completion. It returns true if the task is completed. I tried and tested the same.

    private void OutItems_ItemChange(object Item)
    {
     if (Item is Outlook.TaskItem)
     {
      Outlook.TaskItem taskItem = (Outlook.TaskItem)Item;
      System.Windows.Forms.MessageBox.Show("IsCompleted: " + taskItem.Complete);
     }
    }

    Monday, October 2, 2017 9:16 PM