A
AtulSureka
Hi,
I am trying to capture the Delete Task Item Event.
For that I am handling the ItemRemove event of Task folder.
But handling this event does not provide me the Task Item which is deleted.
How to get the task item within the event handler ??????
I have used the following code for the same.
using System;
using Outlook = Microsoft.Office.Interop.Outlook;
namespace OutlookManager
{
class Program
{
static void Main(string[] args)
{
Outlook.Application application = new Outlook.Application();
Outlook.NameSpace nameSpace = application.GetNamespace("MAPI");
Outlook.MAPIFolder folder =
nameSpace.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderTasks);
folder.Items.ItemRemove += new
Microsoft.Office.Interop.Outlook.ItemsEvents_ItemRemoveEventHandler(Items_ItemRemove);
Console.ReadLine();
}
static void Items_ItemRemove()
{
Console.WriteLine("Some item has been removed");
}
}
}
Regards
Atul Sureka
I am trying to capture the Delete Task Item Event.
For that I am handling the ItemRemove event of Task folder.
But handling this event does not provide me the Task Item which is deleted.
How to get the task item within the event handler ??????
I have used the following code for the same.
using System;
using Outlook = Microsoft.Office.Interop.Outlook;
namespace OutlookManager
{
class Program
{
static void Main(string[] args)
{
Outlook.Application application = new Outlook.Application();
Outlook.NameSpace nameSpace = application.GetNamespace("MAPI");
Outlook.MAPIFolder folder =
nameSpace.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderTasks);
folder.Items.ItemRemove += new
Microsoft.Office.Interop.Outlook.ItemsEvents_ItemRemoveEventHandler(Items_ItemRemove);
Console.ReadLine();
}
static void Items_ItemRemove()
{
Console.WriteLine("Some item has been removed");
}
}
}
Regards
Atul Sureka