A
AtulSureka
Hi,
I have used the following code to Handle the EditItem Event of Task Items
using System;
using System.Data;
using System.Collections;
using Outlook = Microsoft.Office.Interop.Outlook;
public class MyClass
{
private static Outlook.NameSpace nSpace;
private static Outlook.MAPIFolder mapiFolder;
public static void Main(string[] args)
{
Outlook.Application app = new
Microsoft.Office.Interop.Outlook.Application();
nSpace = app.GetNamespace("MAPI");
mapiFolder =
nSpace.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderTasks);
mapiFolder.Items.ItemChange += new
Microsoft.Office.Interop.Outlook.ItemsEvents_ItemChangeEventHandler(TaskItemChanged);
Console.ReadLine();
}
private static void TaskItemChanged(object Item)
{
Console.WriteLine("Item Has been chnaged");
}
}
However many times ItemChange event does not fire.
What can be the possible reasons?
Is there any work around for it?
- Atul Sureka
I have used the following code to Handle the EditItem Event of Task Items
using System;
using System.Data;
using System.Collections;
using Outlook = Microsoft.Office.Interop.Outlook;
public class MyClass
{
private static Outlook.NameSpace nSpace;
private static Outlook.MAPIFolder mapiFolder;
public static void Main(string[] args)
{
Outlook.Application app = new
Microsoft.Office.Interop.Outlook.Application();
nSpace = app.GetNamespace("MAPI");
mapiFolder =
nSpace.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderTasks);
mapiFolder.Items.ItemChange += new
Microsoft.Office.Interop.Outlook.ItemsEvents_ItemChangeEventHandler(TaskItemChanged);
Console.ReadLine();
}
private static void TaskItemChanged(object Item)
{
Console.WriteLine("Item Has been chnaged");
}
}
However many times ItemChange event does not fire.
What can be the possible reasons?
Is there any work around for it?
- Atul Sureka