![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
I'm in deep water now. The item deletion has been worked fine but suddenly
stop working. The ItemRemove event stops firing. But the add and change still work fine. I don't know what cause that. I do declare variables in the class level, following the advices in the article "mstehle: The CDOs and CDONTS of Messaging Development" http://blogs.msdn.com/mstehle/archiv...op-firing.aspx. Here is my code: public partial class ThisAddIn { // appointment related private Outlook.Explorer explorer; private Outlook.Items items; private void ThisAddIn_Startup(object sender, System.EventArgs e) { try { /******* appointment related event handler registration *********/ //explorer = this.Application.ActiveExplorer(); //explorer.SelectionChange += new Outlook.ExplorerEvents_10_SelectionChangeEventHand ler(ThisAddIn_SelectionChanged); //openInspectors = this.Application.Inspectors; //openInspectors.NewInspector += new Outlook.InspectorsEvents_NewInspectorEventHandler( ThisAddIn_NewInspector); Outlook._NameSpace ns = this.Application.GetNamespace("MAPI"); Outlook.MAPIFolder calendarFolder = ns.GetDefaultFolder(Outlook.OlDefaultFolders.olFol derCalendar); items = calendarFolder.Items; items.ItemAdd += new Outlook.ItemsEvents_ItemAddEventHandler(ThisAddIn_ CalenmdarItemAdded); items.ItemChange += new Outlook.ItemsEvents_ItemChangeEventHandler(ThisAdd In_CalenmdarItemChanged); items.ItemRemove += new Outlook.ItemsEvents_ItemRemoveEventHandler(ThisAdd In_CalenmdarItemRemoved); } catch (Exception ex) { ... } } private void ThisAddIn_CalenmdarItemAdded(object item) { } private void ThisAddIn_CalenmdarItemChanged(object item) { } private void ThisAddIn_SelectionChanged() { } private void ThisAddIn_CalenmdarItemRemoved() { } private void ThisAddIn_NewInspector(Outlook.Inspector newInspector) { Marshal.ReleaseComObject(newInspector); } |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
itemchange event in public (exchange) folder occurs if nothing is changed | MIchael | Outlook and VBA | 7 | May 23rd 07 11:04 PM |
ItemChange event is modifying my Calendar Events | mark | Add-ins for Outlook | 4 | November 6th 06 10:17 PM |
ItemAdd event with Outlook2007 | DavidH&P | Outlook - Using Forms | 2 | July 4th 06 08:29 AM |
MapiFolder Items ItemChange is not firing | AtulSureka | Outlook - Using Forms | 1 | February 6th 06 04:32 PM |
Mapi Folder Items ItemChange event is not firing | AtulSureka | Outlook and VBA | 3 | February 5th 06 06:25 PM |