Home:ALL Converter>Is Implementing IDTExtensibility2 And Registering An Add-In Not Enough For It To Be Visible To Office?

Is Implementing IDTExtensibility2 And Registering An Add-In Not Enough For It To Be Visible To Office?

Ask Time:2021-05-01T06:27:02         Author:ScottK

Json Formatter

So, I am trying to create a COM Add-In for 64-bit MS Office (no application in particular, just trying to get something working). I am not trying to make an add-in for the VBE, just something for the Office application itself. I have implemented IDTExtensibility2 like this (top of the file):

<Guid("94164866-CD9D-497A-9A8B-B476BE39749F"), 
ProgId("COM_Add-In_Test.Connection"), 
ComDefaultInterface(GetType(IDTExtensibility2)), 
ClassInterface(ClassInterfaceType.None), ComVisible(True)>
Public Class Connection
    Implements IDTExtensibility2

I have added registry entries under HKEY_CURRENT_USER\SOFTWARE\Microsoft\Office\Excel\Addins\COM_Add-In_Test.Connection (FriendlyName, Description, and LoadBehavior).

The add-in is automatically registered for COM-Interop by Visual Studio (the box is checked). I have also tried adding registry entries manually under HKCU\Classes\CLSID{94164866-CD9D-497A-9A8B-B476BE39749F}, but to no avail.

When I load up Excel, the add-in is not in the COM Add-Ins dialog box and nothing happens (My OnConnection method is MsgBox("Hello World!")).

I am not using any add-in framework of any kind (VSTO, ExcelDNA, etc). I have used these before, but would very much like to understand how to do this process manually.

What am I missing here?

Author:ScottK,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/67341123/is-implementing-idtextensibility2-and-registering-an-add-in-not-enough-for-it-to
yy