VB6 Add-in fails to load in Outlook 16 - message useless

Jef Lee

New Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
I have an add-in created in VB6. I recently updated to Office 365 and Outlook 16 (10.0.6741.2071). I run Windows 7. Now my add-in has stopped loading. The message is:
"Not loaded. A runtime error occurred during the loading of the COM Add-in."
But, a little more information...
There is a development version of the add-in and a production version. Yesterday as I was starting this request, I went to get the error message to ensure it was word-for-word. Imagine my joy, confusion & annoyance when the add-in loaded and ran. Even in the VB6 IDE mode so I could debug it. There before my eyes was the development version running. I quickly told everyone that the issue had resolved itself - bad mistake!
Today I switched to the production version so I could run against a production database. This involves: unregistering the development version, checking the registry to ensure that was effective, then registering the production version. All that seemed to work perfectly. The add-in connection class pointed to the correct DLL. But, Outlook loaded the development version. The description was the production version's but the path was to the development version. I checked the registry for the add-in. All entries that I could read (ie not binary) were to the production version. I even tried deleting binary ones, just to be sure. Didn't help.
I tried hiding the development version - Outlook didn't like that.
Has anyone experienced this? I realise that this is a legacy add-in, but it's still a viable item (or is it?). If you know where Outlook is getting its add-in path from that would be appreciated.
Thanks,
Jef Lee, Perth, Western Australia.
 

Michael Bauer

Senior Member
Outlook version
Outlook 2010 32 bit
Email Account
Exchange Server
If a DLL is really not registered, then Outlook cannot load it. So I'd start looking there. If you use the project compatibility mode, there can be lots of entries in the registry. Maybe your way to unregister left some entries there.

Just curious, why do you have two different versions, why don't you debug and fix not just one version?
 

Jef Lee

New Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
Thanks for the comments Michael.

I'll check the registry for both the unwanted and the wanted to make sure only the latter is there.
There are two versions because the development is the next generation. While it may not have the difference scale as say Windows 7 to Windows 8, it is sufficiently different that it cannot be unleashed on the unsuspecting user - not yet anyway.

You comment "really not registered" suggests something is missing in the registry. I have the CLSID entry, the TypeLib entry, the program.connection class and the entry in the outlook add-ins list that points to those. I am not sure what would be missing. The LoadBehavior is set to 3 before I start Outlook and quickly changes to 2 when Outlook starts - I guess that's Outlook's reaction to a "bad" add-in.

I just changed the project compatibility to None and tested again - no change.

Have you had that error message? Or do you know where I can learn more about it? This error: "Not loaded. A runtime error occurred during the loading of the COM Add-in."

Jef.
 

Michael Bauer

Senior Member
Outlook version
Outlook 2010 32 bit
Email Account
Exchange Server
Not sure what we are talking about, is the wrong version loaded, or doesn't load it at all? If the wrong version is loaded, then it has anything to do with the registry. If an Addin is not loaded at all, as the error message suggestes, then look at the startup code. If you don't have a working logging of errors, and if nothing else helps, then temporarily remove parts of the code until it works.

A compatibility mode of none means that with every compilation new GUIDs for the public classes will be created. If you don't unregister the dll beforehand, or if you don't change the class IDs, you'll end up with versions that cannot be removed by the uninstaller anymore.
 

Jef Lee

New Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
Michael,
Sorry for the big pause. I was reassigned to something more pressing. Back now.
I got what you said about the project compatibility. I don't think that's an issue.
The start-up code hasn't changed. Until recently (two-three months), I could un-register the version I was working on and register the other version. Then I would start VB6, start Outlook and interact through the IDE as I put the Add-In through its paces in Outlook.
Then it broke.
There had been no changes to the connection mechanism in the DSR component. There had been changes to the business logic where the email item was handled.
So what could have changed?
My machine is the same, been so for over a year.
Still running Windows 7.
Upgraded Office to Office 365 ProPlus.
There have been regular MS Windows/Office/etc updates that are applied when I shutdown to go home.
I do not understand how it is that Outlook displays the wrong path to the Add-In. I have manually deleted ALL mention of the version I am not working on and registered the version that I am. I have used Agent Ransack to scurry through files to see if it can find the wrong path secreted in a file somewhere. The only registry entries I would not have deleted would be binary ones where I cannot "read" what the binary means. These do not get found as I search the registry anyway.
On Monday, if I get time, I will try the program called "Process Monitor" to see if I can identify what registry entries are being access by Outlook.
Very frustrating.
Have a great weekend. Supposed to rain Saturday here but fine again Sunday afternoon.
Jef.
 
Top