![]() |
Before delete mail item Event Handler
Hi,
I have used "FolderSwitch","BeforeItemCopy" Event Handlers and got the events fired in corresponding situations successfully. But like that I cannot use "ItemEvents_10_BeforeDeleteEventHandler" for preventing the deletion of certain mails.Whether deletion of mails can be prevented.Can this be done through code (I am using C#.NET VSTO2005) ? Regards RAMS |
Before delete mail item Event Handler
Are you saying the event isn't firing at all, or that setting ref Cancel ==
true doesn't work? That event will only fire if you are handling events for the item and the user deletes the open item from the File, Delete menu item. Otherwise it will not fire. It's not really that useful for that reason. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Professional Programming Outlook 2007 Reminder Manager, Extended Reminders, Attachment Options http://www.slovaktech.com/products.htm "RAMS" wrote in message ... Hi, I have used "FolderSwitch","BeforeItemCopy" Event Handlers and got the events fired in corresponding situations successfully. But like that I cannot use "ItemEvents_10_BeforeDeleteEventHandler" for preventing the deletion of certain mails.Whether deletion of mails can be prevented.Can this be done through code (I am using C#.NET VSTO2005) ? Regards RAMS |
Before delete mail item Event Handler
Hi Ken,
{ explr =app.ActiveExplorer(); } .. .. { explr.BeforeItemPaste += new ExplorerEvents_10_BeforeItemPasteEventHandler(Befo reItemPaste); } like this I have used the BeforeItemPaste event handler and got fired.But like that I cant able to initialize "explr.BeforeDeleteEvent += new Microsoft.Office.Interop.Outlook.ItemEvents_10_Bef oreDeleteEventHandler(BeforeDelete);". thanks and regards RAMS "Ken Slovak - [MVP - Outlook]" wrote: Are you saying the event isn't firing at all, or that setting ref Cancel == true doesn't work? That event will only fire if you are handling events for the item and the user deletes the open item from the File, Delete menu item. Otherwise it will not fire. It's not really that useful for that reason. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Professional Programming Outlook 2007 Reminder Manager, Extended Reminders, Attachment Options http://www.slovaktech.com/products.htm "RAMS" wrote in message ... Hi, I have used "FolderSwitch","BeforeItemCopy" Event Handlers and got the events fired in corresponding situations successfully. But like that I cannot use "ItemEvents_10_BeforeDeleteEventHandler" for preventing the deletion of certain mails.Whether deletion of mails can be prevented.Can this be done through code (I am using C#.NET VSTO2005) ? Regards RAMS |
Before delete mail item Event Handler
Did you read what I said?
If you look in the Object Browser there is no Explorer.BeforeItemDelete event, so how could you subscribe to it. That event is only there for Inspector's. From my previous post: That event will only fire if you are handling events for the item and the user deletes the open item from the File, Delete menu item. Otherwise it will not fire. It's not really that useful for that reason. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Professional Programming Outlook 2007 Reminder Manager, Extended Reminders, Attachment Options http://www.slovaktech.com/products.htm "RAMS" wrote in message ... Hi Ken, { explr =app.ActiveExplorer(); } . . { explr.BeforeItemPaste += new ExplorerEvents_10_BeforeItemPasteEventHandler(Befo reItemPaste); } like this I have used the BeforeItemPaste event handler and got fired.But like that I cant able to initialize "explr.BeforeDeleteEvent += new Microsoft.Office.Interop.Outlook.ItemEvents_10_Bef oreDeleteEventHandler(BeforeDelete);". thanks and regards RAMS |
All times are GMT +1. The time now is 11:18 AM. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2006 OutlookBanter.com