In earlier versions of Access, COM add-ins placed buttons on the menu or toolbar you specified,
using the CommandBars collection. In Access 2007, COM add-ins place buttons in the Toolbar
Commands group of the Add-Ins tab of the Ribbon, for backwards compatibility with the old
CommandBars collection.
In addition to COM add-ins and Access add-ins, Access 2007 also offers a brand-new option: using
the XML programming language to add controls to the Ribbon, powered by code written in VBA.
This technique is covered in Chapter 15.
Creating a COM Add-in Using Visual Basic 6.0 ................................................................
When you create a COM add-in, instead of creating a library database with a USysRegInfo table (as
you would for an Access add-in), you create a VB project, with a special Designer module, a stan-
dard module, and (optionally) a form. When creating a COM add-in using VB 6, you can save time
by using a COM add-in project template. The one I use was created for use in the Developer
Edition of Office 2000, but with some minor modifications, it works fine in VB as well.
Using the COM Add-in Template ............................................................................
To make the COM add-in template available as one of the selections when creating a new VB proj-
ect, copy the COM Add-in template files to the Projects folder under the VB Templates folder (usu-
ally C:\Program Files\Microsoft Visual Studio\VB98\Template\Projects), as shown in Figure 13.1.
When you next open VB, you will see a COM Add-In selection as one of the available project tem-
plate choices, as shown in Figure 13.2.
Once you’ve selected the COM Add-In template and have clicked OK, a new project is created
based on the template, including a form, a module, and a designer. These objects are located in the
Project Explorer (on the right side of the VB window), as shown in Figure 13.3.
Part III Adding More Functionality to Office