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

Not open for further replies.

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.
Jef Lee, Perth, Western Australia.
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?
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."

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.
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.
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
A vb6 run time error 5 when Outlook 2007 Explorer object displayed Outlook VBA and Custom Forms 1
R Sending email using VB6 Outlook VBA and Custom Forms 1
Y Encode TNEF file with VB6 Outlook VBA and Custom Forms 1
W OL2003 & VB6:- "Could not send the message" Outlook VBA and Custom Forms 7
Q VB6 to VB.Net Migration Outlook VBA and Custom Forms 3
G Add Map It button to Custom Contacts Form in Outlook Outlook VBA and Custom Forms 1
G Outlook 2021 Add Picture to Custom Contact Form Outlook VBA and Custom Forms 2
P Can't add custom field to custom Outlook form, it always adds to the Folder instead Outlook VBA and Custom Forms 2
P VBA to add email address to Outlook 365 rule Outlook VBA and Custom Forms 0
S Outlook 2019 Custom outlook Add-in using Visual Studio Outlook VBA and Custom Forms 0
G automatically choosing "add to autocorrect" option Using Outlook 0
F Want to add second email to Outlook for business use Using Outlook 4
K Add an entry to a specific calendar Using Outlook 1
F Add a category before "Send an Email When You Add an Appointment to Your Calendar" Outlook VBA and Custom Forms 0
J Want to create a button on the nav bar (module add-in) to run code Outlook VBA and Custom Forms 2
M "Attachment Detacher for Outlook" add in, does it update the server copy of the email? Using Outlook 1
J Outlook 365 Add keywords from Listbox to the message body where cursor is placed Outlook VBA and Custom Forms 0
O Add Day Number of the year for 2023-2033 Outlook VBA and Custom Forms 5
J GoDaddy migrated to Office365 - Outlook Wont Add Account Exchange Server Administration 21
F Outlook 2019 Outlook 2019 Add and Sync to New computer Comcast server Using Outlook 2
Witzker Add a text line at the end of the note field in all selected Contacts Outlook VBA and Custom Forms 7
A iCloud Outlook Add In is causing Outlook 2021 to crash and got disabled Using Outlook 10
N How to add or delete items to Move dropdown Menu Using Outlook 0
G Add contacts birthday to calendar Using Outlook 4
V How to add 'Previous Item' and 'Next Item' to the Quick Access Toolbar Using Outlook 1
Commodore Safe way to add or update holidays; Windows Notifications issue Using Outlook 8
kkqq1122 How would I add Search for attachment name Outlook VBA and Custom Forms 3
L did MS ever add way to text via Outlook Using Outlook 5
P How to add a column named categories when searching in Outlook Using Outlook 0
M add new attendee to existing meetings with VBA Outlook VBA and Custom Forms 5
N Can't create NEW GROUP and add/remove a member from existing Group in Outlook Using Outlook 1
Witzker Outlook 2019 Pls. add a Prefix for OUTLOOK 2019 here Using Outlook 1
P Add inanimate objects to meetings? Using Outlook 1
O Outlook 2010 Add delete button to the side of the message list Using Outlook 1
BartH Add a string to the conditions in .Conditions.BodyOrSubject.Text Outlook VBA and Custom Forms 2
A "Get Add-Ins" - Which Version of Outlook to use Using Outlook 1
D Do I need Exchange Add-In? Using Outlook 6
C-S-R Manage Add-ins (Remove Wunderlist) Using Outlook 6
A iCloud add in problems Using Outlook 4
L Macro to add Date & Time etc to "drag to save" e-mails Outlook VBA and Custom Forms 17
C Looking for feedback on new Outlook Add-in Using Outlook 0
L isn't there an OL add-on that flags addressee before sending Using Outlook 3
S Add VBA save code Using Outlook 0
P Shortcut Pane - add shortcut to Office365 group mailbox Using Outlook 1
Z Add ComboBox Value to Body of Email Outlook VBA and Custom Forms 1
G How to add a folder shortcut to outlook quick access toolbar? Using Outlook 6
G Add to Outlook Contacts - Point to non-default contacts folder Using Outlook 0
M Automatically add senders first name to a greeting Outlook VBA and Custom Forms 1
C Add Form to Appointments Received, Automatically Outlook VBA and Custom Forms 6

Similar threads