BeforeFolderDelete event

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

Ken Slovak - [MVP - Outlook]

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top