FolderAdd event and folder creation

S

SeekerOfTruths

Hi, I am currently trying to detect when a user is attempting to create
a new folder in Outlook so that I can present an alternative to the New
Folder dialog when the user is performing this action in a particular
(non-Exchange) message store.

I can intercept the EECMDID_FileNewFolder command via the
IExchExtCommands interface and this allows me to catch folder creation
when the user selects File->New->Folder from the Outlook Menu, however
it doesn't work when New Folder is selected from the right-click
context menu in the hierarchy pane.

I've found that the Outlook Object Model has a FolderAdd event, which I
might be able to make use of in this situation, but I have a suspicion
that this event fires AFTER the call to CreateFolder on the parent
IMAPIFolder object (which is after the New Folder dialog has been
presented and the user has clicked on the OK button to create the new
folder).

Can anyone tell me whether or not my suspicion is correct, and if it is
correct, whether there is any other way in which I might be able to
intercept the New Folder dialog and replace it with my own (when
working with folder objects in my message store)?

Regards,

Seeker.
 
A

asidden

Yep, you're right.

FolderAdd events fires after folder creation. It's signature has an
pointer to the folder object, which was just created.
 

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