views:

91

answers:

3

Does anyone know of good reference material for creating a com addin for the VBA Editor enviroment, i know its exactly the same as writing a com addin for common enviroments using the addin model provided by microsoft using the IDTExtensibility2 interface. just registering the com registry keys to a different location, Where is that location?

Also any examples on .net interop code for how to reference the code editor, in as much detail as possible, add custom menu items to the context menu. you know normal customization code. Also if anyone knows how to hook up visual studio for debugging said project. If you know of anyone of these, id be very much indebted.

+1  A: 

This could be the registry location - HKCU\Software\Microsoft\VBA\VBE\6.0\Addins

I found this by running Process Monitor from sysinternals.

Capture Events using Process Monitor
Ran Excel, Alt+F11, Tools -> Addins

EDIT: I don't know much about .net interoping with addin code.

But, I would open the addin project, set the necessary breakpoints, keep it in run mode, open the VBA editor, load the addin & take actions which will make me break into the code of the addin.

shahkalpesh
Ok that works great thanks, any idea where i can get some reference on the other things?
almog.ori
+1  A: 

"Microsoft Office 2000 Visual Basic Programmer's Handbook" (ISBN 3-86063-289-2) has four (!) pages on this subject. I only have the German edition, but I could translate the important bits if you think it might help. Obviously, nothing about .Net Interop in there, but some basic info about writing VBE Add-ins.

Tom Juergens
+2  A: 

It looks like the person who put together the MZ Tools has a small section on their site with some resources on building VBE Addins

http://www.mztools.com/resources_vs60_addins.aspx

Jon Fournier
Great link, thanks a bunch
almog.ori