How to avoid to delete or open messages ??

  • Thread starter Hector Y. Martinez
  • Start date
H

Hector Y. Martinez

Hi, here is my situation, my plugin creates a folder in outlook, then I
want to avoid that any messages in that folder could be deleted... I try
with the ItemRemove event, but this event is called when the message is
already deleted... any suggestion ? Then the other thing is that I want that
the user neither could open the messages in that folder... I test the
NewInspector event from the Inspectors collection, but I don't know how can I
avoid the Inspector to be open. Or should I try something else ? I using C++
for this...

Thanx in advance...
 
K

Ken Slovak - [MVP - Outlook]

The best way to prevent people from deleting items in your custom folder is
to set the permissions on the folder so no one can delete items there except
for certain admins. That's possible if the folder is in an Exchange store,
you'd use ADSI code or something like that to set the permissions on the
folder, or if you use Redemption you can use the ACL and ACE objects for the
folder. ADSI code you should post about in an Exchange programming forum.

You cannot prevent people from opening items, however you can cancel the
opening by setting Cancel == true in the MailItem.Open() event handler (or
the Open() handler for any item type).
 

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