What language? I have an ATL class that allows dynamic folder event sinks.
Probably I should make it clearer.
I could dynamically folder event sink, the classes are available in ATL I
know . And the Outlook could detect the folder event (although,
FolderDeletion could not detect the last folder deletion in a Folder
collection, but that could be overcome with some algorithm) . The problem is
that I could not accurately determine "when" should dynamically event sink
for the needed folder collection.
As you know, the befoforefolderswitch (which is the time to dynamically
event sink) only occur if user open the folder, that is by left clicking a
folder. If user choose to right click on a folder and through context menu
do some folder stuff. There is no way to determine if the user is clicking
on that particular folder. Therefore, the dynamic event sink approach could
not be a right approach to achieve what I want, to detect any folder
collection happen in Outlook.
The CommandBarUpdate could detect the user right click but after some test,
to my dissapointment, the event happen in an inconsistent manner.
The ultimate approach that I could think of is to event sink all the folder
collections in the Outlook and when there are Folder added/ remove. Then,
the corresponding new folder collection will get event sink / unadvice.
The only problem of me to this is the overhead it might cause, imagine
there are many folders in Outlook.
Anyway, thanks for your reply.
> What language? I have an ATL class that allows dynamic folder event sinks.