BeforeFolderDelete event

  • Thread starter Thread starter Mike
  • Start date Start date
M

Mike

Is there such a thing as a BeforeFolderDelete event, or OnFolderDelete,
something like that? I need a way to determine that the user is attempting
to delete a folder that is critical to addin operation, and as such I want to
disable this action.
 
There's a Folders.FolderRemove() event you can use but it fires after the
folder was removed and it doesn't tell you which folder was removed, just
that one of the folders was removed.

In Outlook 2007 there's a Folder.BeforeFolderMove event that fires before a
folder location is moved or before the folder is deleted. Of course you'd
have to have subscribed to that folder's events prior to the deletion. In
the case of this event a deletion is indicated by the MoveTo argument being
null. That event also has a Cancel argument used to cancel the
move/deletion.
 
Back
Top