Dear All, In Outlook 2010 (32 bit) on Windows 7 Home Premium (64 bit), procedure
ID: 3560392 • Letter: D
Question
Dear All,
In Outlook 2010 (32 bit) on Windows 7 Home Premium (64 bit), procedure Application_Startup (ThisOutlookSession) won't automatically fire on Outlook startup. The same problem is with Application_Quit on shutdown.
I can run Macros by hand from VBA Editor or from Ribbon button, I can also run "by hand" procedures Application_Startup and Application_Quit.
What is more, after using VBA Editor or running any Macro, on shutdown Application_Quit is correctly run. So it looks like VBA Addin must by loaded on request/by hand via starting VBA Editor or running any Macro.
I guess the problem doesn't concern security issues, as for tests I have enabled all macros without any warnings/restrictions, I have additionally signed my macros with Selfcert.exe.
I have noticed that in "Options -> Addins" menu my "Addin MS VBA for Outlook" (outlvba.dll) has a "Inactive addin" status.
What is more when trying to add and load outlvba.dll using option "Manage COM Addins" following info is displayed:
"Behavior on loading: Load on request, (currently not loaded)".
When I open VBA Editor (Alt+F11) and/or run any macro, above mentioned addin changes status to "Active addin" and during shutdown procedure "Application_Quit" is correctly run.
I want to add that Outlook 2010 with the same project VbaProject.OTM works great on Windows Vista 32 bit.
During tests I have also run Outlook in different "compatibility" settings. Using Windows tools "Solve compatibility problems" I have changed parameters to:
"Run as admin"
"Vista compatibility mode"
"XP compatibility mode"
While using above mentioned tool Outlook was started correctly, including running Application_Startup on startup.
However, after saving changes, leaving Wizzard and running Outlook once again, everything was ruined again and Application_Startup didn't execute.
Now my Application_Startup has only 1 line (MsgBox "Test"), so I doubt the problem is any potential code mistake.
I have read a lot of stuff and didn't find any solution of my problem, so I will be very thankful for Your help!
Explanation / Answer
Close Outlook, then see if changing the value for LoadBehaviour to "3" here in the registry makes a difference:
HKEY_LOCAL_MACHINESOFTWAREWow6432NodeMicrosoftOfficeOutlookAddinsMicrosoft.VbaAddinForOutlook.1
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.