MZ-Tools Articles Series: Changing gears (just a little bit)
For the past years I have been writing articles in the MZ-Tools Series and posts in this blog about developing add-ins with Visual Studio .NET for Visual Studio .NET, using the .NET Framework. All this knowledge comes from my experience developing since 2002 the versions 4.0, 5.0, 6.0 and 7.0 of my MZ-Tools add-in for Visual Studio. As you may know, I have also the MZ-Tools 3.0 version for Visual Basic 6.0, 5.0 and the VBA editor, that I created with Visual Basic 6.0 back in 2000.
When Office 2010 came out, for the first time there was a 64-bit version, not only a 32-bit version, and, alas, the VBA editor of the 64-bit version doesn't support 32-bit COM add-ins. So, MZ-Tools 3.0 for VBA doesn't support Office 2010 64-bit. I have received some requests to support it, and things only will get worse as more developers install the 64-bit version. The same is happening to other developers creating add-ins for the VBA editor. Until now, the common answer was that it was not possible, since VB6 can only create 32-bit COM add-ins and Office 2010 64-bit can't use 32-bit COM add-ins.
About 3 months ago I devoted some thoughts about it and I got the idea of developing an add-in for the VBA editor of Office 64-bit using the .NET Framework, since .NET assemblies can be 64-bit, and .NET assemblies can be registered as COM components... I was so excited that I halted the development of MZ-Tools 7.0 during a week to make a prototype and after several difficulties...I succeeded :-).
Not only I got a Hello World prototype, but I also managed to create toolbars, buttons, toolwindows, to use a single NET .dll and setup to target the 32-bit and 64-bit versions of the VBA editor and as bonus tracks, to install the add-in without admin rights and to avoid the use of the clipboard to use custom pictures in buttons (two common sources of issues of MZ-Tools 3.0 for VBA).
So I am going to write a few articles in the next weeks to document the whole approach from start (Hello World) to end (the setup). Of course, I will keep writing about Visual Studio add-ins.
PS: the (great) future of MZ-Tools 3.0 for VB6/VB5/VBA will be announced in the MZ-Tools blog in the next months.