2

My third party add-ins are no longer starting automatically with Excel.

The issue is the same as described here: Excel COM add is not loading during startup and have to add it manually

However it seems the solution is no longer valid.

I did find a registry entry for [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\Excel\Addins\MyAddinName] and it did have a LoadBehavior entry set to 3, but it does not seem to be working.

Once Excel is loaded, I can check the add-in and it works normally, but it has to be done every time.

I did recently update to Version 2002 (Build 12527.20612) and wondering if this version changed addin loading?

Update The add-ins do not have any problems and do not crash or become dissabled. They simply do not start with Excel. Going to add-ins and checking the appropriate ones works every time.

MichaelE
  • 763
  • 8
  • 22
  • Add-ins have to be in trusted document or be located in a trusted folder. See here: https://support.office.com/en-us/article/view-my-privacy-options-in-the-microsoft-office-trust-center-d672876e-20d3-4ad3-a178-343d044e05c8 – HackSlash Jun 04 '20 at 15:26

2 Answers2

0

Instead of enabling the add-in every time Excel is started, you need to find the cause which leads to disabling the add-in...

Microsoft Office applications can disable VSTO Add-ins that behave unexpectedly. If an application does not load your VSTO Add-in, the application might have hard disabled or soft disabled your VSTO Add-in.

Hard disabling can occur when a VSTO Add-in causes the application to close unexpectedly. It might also occur on your development computer if you stop the debugger while the Startup event handler in your VSTO Add-in is executing.

Soft disabling can occur when a VSTO Add-in produces an error that does not cause the application to unexpectedly close. For example, an application might soft disable a VSTO Add-in if it throws an unhandled exception while the Startup event handler is executing.

When you re-enable a soft-disabled VSTO Add-in, the application immediately attempts to load the VSTO Add-in. If the problem that initially caused the application to soft disable the VSTO Add-in has not been fixed, the application will soft disable the VSTO Add-in again.

So, I'd suggest enabling logging and find which line of code fires an exception at runtime and why the add-in is automatically disabled. See How to: Re-enable a VSTO Add-in that has been disabled for more information.

If you are not the add-in developer, I'd suggest contacting them then.

Eugene Astafiev
  • 47,483
  • 3
  • 24
  • 45
  • The add-in itself has no issues and works perfectly fine and is not disabled, but simply will not auto start.. – MichaelE Jun 03 '20 at 21:15
  • Add-ins that have no issues can be started automatically. – Eugene Astafiev Jun 03 '20 at 21:17
  • I did contact the developer and we went through the logs and found no indication of issues. It is also more than 1, but all 3'rd party add-ins that will not start automatically, but native Excel add-ins do remember their start state. I'm stumped. – MichaelE Jun 03 '20 at 21:36
-1

After some searching through the registry I found a new location with the add-in name.

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\ClickToRun\REGISTRY\MACHINE\Software\Wow6432Node\Microsoft\Office\Excel\Addins\MyAddinName] And there was a LoadBehavior set to 0 and when I set it to 3 the add-ins load at startup as before.

This seems to be a new registry location for add-in startup. I am using the 32-bit version. Can anybody check if the 64 bit version also has a new location?

MichaelE
  • 763
  • 8
  • 22
  • That location is automatically managed. If you send registry entries from a 32-bit program it automatically goes under the `Wow6432Node`. Likewise if you try to send a setting to the normal location from a C2R application it gets filed under `ClickToRun`. You should never include those locations manually. Send the registry settings to the normal location and let Windows manage it. SOURCE: https://learn.microsoft.com/en-us/windows/win32/winprog64/registry-redirector – HackSlash Jun 04 '20 at 15:23
  • The registry entry I found is unique, it does not map to any other that I can find. If it is, how can I find the true source? – MichaelE Jun 04 '20 at 16:48
  • 1
    Microsoft is the source of truth: https://support.microsoft.com/en-us/help/291392/excel-com-add-ins-and-automation-add-ins – HackSlash Jun 04 '20 at 20:55
  • 1
    You need some way of finding the version and adding the correct version number. There could be multiple versions installed so you want to hit them all. Like this: https://bettersolutions.com/excel/add-ins/registry-keys.htm – HackSlash Jun 04 '20 at 20:55