yep, it's really cool :)
This shoud be faster as it keeps the ref on xl:
private xlApp as excel.application
private sub application_startup()
set xlApp=new excel.application
end sub
The variable is set to Nothing automatically when you close Outlook.
It doesn't matter where the code is running. You most likely call Workbook.Save*, so you're calling a method of the Excel library.
Workbook.Application refers to the Excel application object, so it's pretty simple: Workbook.Application.DisplayAlerts=false
You just need to insert the variable...
You'd need to move the event to a class module, loop through the entire folder hierarchy and create one object of that class for every folder. Use a collection in ThisOutlookSession to store the reference on each object of your class module. Here is a sample for the loop through all folders.
Keep in mind, after every change of the code the "initalize_handler" should be called, which isn't called automatically at startup. Better name it Application_Startup
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.