Outlook Banter

Outlook Banter (http://www.outlookbanter.com/)
-   Add-ins for Outlook (http://www.outlookbanter.com/add-ins-outlook/)
-   -   Prevent users from moving or deleting a folder (http://www.outlookbanter.com/add-ins-outlook/78430-prevent-users-moving-deleting-folder.html)

asoni12[_2_] September 10th 08 01:50 PM

Prevent users from moving or deleting a folder
 
How can I prevent users from deleting/moving a folder in Outlook/exchange
that is created by my application? On solution might be to create an outlook
plug-in and handle the event which is triggered before a folder is deleted. I
could find an Outlook Object Model event FolderRemove but it gets triggered
after the deletion of the folder. Any other idea?

Ken Slovak - [MVP - Outlook] September 10th 08 02:31 PM

Prevent users from moving or deleting a folder
 
Version of Outlook?

For Outlook 2003 and earlier that's about it, the FolderRemove() event,
which is pretty useless for what you want. You'd have to respond to that
event and either re-create your folder or you'd have to hunt to find where
it was moved and try to move it back.

For Outlook 2007 you have the new Folder.BeforeFolderRemove() event which
can be cancelled.

If you subscribe to that event on your folder you get a MoveTo folder object
and a boolean Cancel parameter. If MoveTo is null the folder is being hard
deleted, otherwise it points to the new folder that will become the parent
of your folder. For soft deletes MoveTo points to Deleted Items.

Set Cancel to true to cancel the move.

--
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


"asoni12" wrote in message
...
How can I prevent users from deleting/moving a folder in Outlook/exchange
that is created by my application? On solution might be to create an
outlook
plug-in and handle the event which is triggered before a folder is
deleted. I
could find an Outlook Object Model event FolderRemove but it gets
triggered
after the deletion of the folder. Any other idea?




All times are GMT +1. The time now is 08:09 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