A Microsoft Outlook email forum. Outlook Banter

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.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook - Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Before delete mail item Event Handler



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old February 29th 08, 01:04 PM posted to microsoft.public.outlook.program_forms
RAMS
external usenet poster
 
Posts: 10
Default 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
Ads
  #2  
Old February 29th 08, 01:59 PM posted to microsoft.public.outlook.program_forms
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default 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


  #3  
Old March 3rd 08, 05:28 AM posted to microsoft.public.outlook.program_forms
RAMS
external usenet poster
 
Posts: 10
Default 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



  #4  
Old March 3rd 08, 01:38 PM posted to microsoft.public.outlook.program_forms
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default 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


 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Event handler when a mail from the inbox is selected Cherry Add-ins for Outlook 1 February 9th 08 01:10 PM
AdvancedSearchComplete event handler nana Outlook and VBA 3 June 30th 07 06:10 AM
event handler for changes to TO CC and BCC properties of mailitem epsilon_9 Outlook and VBA 3 January 15th 07 03:14 PM
Outlook VSTO Appointment Item Delete Event lg Add-ins for Outlook 0 July 31st 06 10:35 AM
Handling Task Item Delete Event AtulSureka Outlook - Using Forms 0 January 24th 06 10:25 AM


All times are GMT +1. The time now is 11:36 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2024 Outlook Banter.
The comments are property of their posters.