N
Neetu
In outlook we are creating custom folder.
we need to catch folder delete event if user delete this folder or some
other code deletes it. Reason, all subfolders's properties of main folder
need to reset like some are attached with some url and some have event
handlers.
I am attaching BeforeFolderMove with main folder at the time of creation
private void CreateMainFolder()
{
MFMainfolder = mobjmfParent.Folders.Add("mainfoldername",
OlDefaultFolders.olFolderInbox);
Folder Folder = mobjmfTubetrak as Folder;
Folder.BeforeFolderMove += new
APIFolderEvents_12_BeforeFolderMoveEventHandler(mainFolder_BeforeFolderMove);
}
void mainFolder_BeforeFolderMove(MAPIFolder MoveTo, ref bool Cancel)
{
/// code to reset all subfolder properties....
}
when i am running this code for reset, some times BeforeFolderMove got fires
and some times not..
when i put breakpoint at BeforeFolderMove event is works every time.. but if
i run solution with out breakpoints, it fires randomly.
I am using c#, outlook 2005 and VSTO.
Any suggestion, or tips are welome.
we need to catch folder delete event if user delete this folder or some
other code deletes it. Reason, all subfolders's properties of main folder
need to reset like some are attached with some url and some have event
handlers.
I am attaching BeforeFolderMove with main folder at the time of creation
private void CreateMainFolder()
{
MFMainfolder = mobjmfParent.Folders.Add("mainfoldername",
OlDefaultFolders.olFolderInbox);
Folder Folder = mobjmfTubetrak as Folder;
Folder.BeforeFolderMove += new
APIFolderEvents_12_BeforeFolderMoveEventHandler(mainFolder_BeforeFolderMove);
}
void mainFolder_BeforeFolderMove(MAPIFolder MoveTo, ref bool Cancel)
{
/// code to reset all subfolder properties....
}
when i am running this code for reset, some times BeforeFolderMove got fires
and some times not..
when i put breakpoint at BeforeFolderMove event is works every time.. but if
i run solution with out breakpoints, it fires randomly.
I am using c#, outlook 2005 and VSTO.
Any suggestion, or tips are welome.