How can i get the outlook search folder deleted event?

43 Views Asked by At

I need to get an event when delete outlook search folder
current i am using below event but its not fire

void folders_FolderRemove()
{
    MessageBox.Show("A folder was removed");
}
1

There are 1 best solutions below

0
Eugene Astafiev On

It is not clear how you subscribe to the Remove event of the Folders class.

Most probably the source object is swiped by the garbage collector. You need to declare it at the global scope (i.e. class level) to make sure it is alive when the folder is removed.