Comparing COM Add-ins with Access Add-ins ................................................................
In previous versions of Office, COM add-ins had an advantage compared to Access add-ins: you
could place a button on any menu or toolbar, whereas Access menu add-ins only appeared on the
Add-ins menu. Although VB 6 COM add-ins do work in Access 2007, they have lost this advan-
tage over Access add-ins, because all commands created by a COM add-in now appear in the
Toolbar Commands group of the Add-Ins tab of the Ribbon, not in the appropriate group or tab of
the Ribbon.
You can add groups, buttons, and menu selections to the Ribbon using XML; this tech-
nique is discussed in Chapter 15.
Compared to COM add-ins, Access add-ins have several extra features: you can create not only
menu add-ins, but also wizards of various types, and builders; this lets you add functionality to dif-
ferent locations in an Access database. In Access 2000 through 2003, you could create wizards that
would appear as extra choices on the New Form dialog, though in Access 2007 this must now be
done using XML to modify the Ribbon. However, property builders that run from various proper-
ties still work fine in Access 2007 (at least if you are running Windows XP), so my LNC Rename
add-in can be run from the Name property of a control to rename an individual control; this func-
tionality can’t be duplicated in a COM add-in.
Summary ..........................................................................................................................
In this chapter you learned how to create a VB 6 COM add-in that works with Access 2007, placing
buttons in the Toolbar Commands group of the Add-Ins tab of the Ribbon. If you have a VB 6
add-in created in a previous version of Office, you can modify it slightly so that it will work in
Access 2007, reusing your code. If, on the other hand, you want to learn a new programming lan-
guage so you can put groups and buttons on specific tabs of the Ribbon, see the next two chapters
for working with Ribbon XML and Visual Studio 2005 add-ins.
CROSS-REFCROSS-REF
Creating COM Add-ins with Visual Basic 6 13