Deleting Folders When Outlook Closes

O

Odd Spot

Does anyone know of an event to listen to that will fire early enough
in the shutdown process of Outlook to delete a folder, specifically a
search folder? When I try listening to the two com add-in events
(OnBeforeDeactivate and OnBeforeShutdown (i think those are the
names)), I get permission errors and the folders are still there when I
restart Outlook.

Thanks,
Jared
 
S

Sue Mosher [MVP-Outlook]

Such code needs to run when the last Explorer window shuts down. Those
events are too late.
 
O

Odd Spot

Yup, that did it. I didn't realize there was a close event that could
be listened to on the Explorer due to a design time issue with the
Outlook Interop. (The Explorer has both an event "Close" and a method
"Close" and the IDE does not recognize the event).





-----------------Quoted Text -------------------

Such code needs to run when the last Explorer window shuts down. Those
events are too late.

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers



- Hide quoted text -
- Show quoted text -
 

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