D
DavidH&P
hi,
can anyone help me to find what's wrong in my code ?
I'm using VSTOv3 and Outlook2007 beta2,
I try to use the ItemAdd event but any messageBox appear when i move a mail
into the inbox folder or when a new mail arrives into this folder.
-----------------------------
Outlook.NameSpace mapiNamespace = this.GetNamespace("MAPI");
Outlook.MAPIFolder inBox = (Outlook.MAPIFolder)
this.ActiveExplorer().Session.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderInbox);
Outlook.MAPIFolder oFolderSurveille = inBox;
Outlook.Items oItems = oFolderSurveille.Items;
oItems.ItemAdd += new
Microsoft.Office.Interop.Outlook.ItemsEvents_ItemAddEventHandler(oItems_ItemAdd);
private void oItems_ItemAdd(object Item)
{
MessageBox.Show("ItemAdd event");
}
can anyone help me to find what's wrong in my code ?
I'm using VSTOv3 and Outlook2007 beta2,
I try to use the ItemAdd event but any messageBox appear when i move a mail
into the inbox folder or when a new mail arrives into this folder.
-----------------------------
Outlook.NameSpace mapiNamespace = this.GetNamespace("MAPI");
Outlook.MAPIFolder inBox = (Outlook.MAPIFolder)
this.ActiveExplorer().Session.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderInbox);
Outlook.MAPIFolder oFolderSurveille = inBox;
Outlook.Items oItems = oFolderSurveille.Items;
oItems.ItemAdd += new
Microsoft.Office.Interop.Outlook.ItemsEvents_ItemAddEventHandler(oItems_ItemAdd);
private void oItems_ItemAdd(object Item)
{
MessageBox.Show("ItemAdd event");
}