COM addin for Excel

COM addin for Excel

Has anyone ever made a COM addin for Excel in Office 2000? I made a COM dll and I could use it from VB so that checked out ok. I then made registry changes to identify that this is an addin for Excel. That didn't seem to work so I then followed the instructions to add the COM addin item to my menus and tried browsing to it but that didn't work either. Has anyone had success with this? I'd really like to add a formula to Excel without using VBA and an addin workbook (XLA) in the middle.

4 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

I haven't created COM add-ins for Office 2000 (still stuck in the world of Office 97), but I've done one for Visual Studio. The first question that comes to mind is did you implement the IDTExtensiblity2 interface? There's a number of MSDN articles which may be of some help. A quick search can find them. The articles are typically written for VB programmers, but they can still be of help in figuring out what to do. (I went down a similar path when I wrote my VS add-in in C++)


Ah... the IDTExtensiblity2 interface. Thanks! I forgot all about it. With a bit of luck I should be able to do this and then post a shell of something that will let others go and add Excel functions.

After trying a bit I've decided that I don't know how to implement an interface for IDTExtensiblity2. What I do know is MSADDNDR.tlb is the type library for it. Does anyone have any hints? Do I use the Fortran COM Server Wizard to add an Interface manually to my Class? Would you then use the OLE/COM object viewer to read it and copy the information into the wizard? I see this:

dispinterface _IDTExtensibility2 {
void OnConnection(
[in] IDispatch* Application,
[in] ext_ConnectMode ConnectMode,
[in] IDispatch* AddInInst,
[in] SAFEARRAY(VARIANT)* custom);
void OnDisconnection(
[in] ext_DisconnectMode RemoveMode,
[in] SAFEARRAY(VARIANT)* custom);
void OnAddInsUpdate([in] SAFEARRAY(VARIANT)* custom);
void OnStartupComplete([in] SAFEARRAY(VARIANT)* custom);
void OnBeginShutdown([in] SAFEARRAY(VARIANT)* custom);

It looks like important stuff but I don't know what to do with it. Any thoughts?

Leave a Comment

Please sign in to add a comment. Not a member? Join today