![]() |
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
|
|||
|
|||
![]() Hello List, I want to unregister some events, When execuation code reached to the line tems.ItemAdd -= new Outlook.ItemsEvents_ItemAddEventHandler(this.Items _ItemAdd); it raises exception: "Object reference not set to an instance of an object." I am using following code void load() { Outlook.MAPIFolder Task = ns. GetDefaultFolder(Outlook.OlDefaultFolders.olFolder Tasks); } UnregisterEvent() { // This line throw exception , Object reference not set to an instance of an object items.ItemAdd -= new Outlook.ItemsEvents_ItemAddEventHandler(this.Items _ItemAdd); } . . . . . . .. . Following piece of code exist in another class Item_AddEvent() { olTaskIem -- add some UserProperty olTaskItem.Save() // this functin raise Item Add event TaskFolderHandler objTask = TaskFolderHandler(); objTask . UnregisterEvent(); } . . . .. Can anyone figure out why error is being raised, and how I overcome this problem? Thanks i nadvance |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
1-Day Events randomly turn into 2-Day Events | MJWUSTL | Outlook - Calandaring | 1 | August 16th 06 06:25 PM |
Item open events and double click events in exchange client extension. | Fanxa | Add-ins for Outlook | 1 | August 9th 06 09:18 AM |
All Day Events and Recuring events | Brian | Outlook - Calandaring | 0 | August 4th 06 03:17 PM |
Custom Events | Theresa Smallwood | Outlook - Using Forms | 0 | May 9th 06 05:07 PM |
Events not always triggered | Jim Burke in Novi | Outlook and VBA | 1 | January 30th 06 07:36 AM |