Share via


Add-in Registration

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

Before you can use a COM add-in in a Microsoft® Office XP application, the add-in DLL must be registered, just as any other DLL on the computer. The DLL's class ID is registered beneath the \HKEY_CLASSES_ROOT subtree in the registry. The DLL can be registered on a user's computer by using a setup program, such as those created by the Packaging Wizard or by running the Regsvr32.exe command-line utility that is included with Microsoft® Windows®. Adding a COM add-in by using the COM Add-ins dialog box also registers the DLL — if it was created with Microsoft® Visual Basic® 6.0.

Registering the DLL beneath the \HKEY_CLASSES_ROOT subtree informs the operating system of its presence, but additional information must be added to the registry for the add-in to be available to an Office XP application. This is the information that you can specify in the add-in designer — the add-in's name, description, target application, target application version, and initial load behavior. The add-in designer makes sure this application-specific information is written to the correct place in the registry at the same time that the add-in DLL is registered. The COM Add-ins dialog box displays the information contained in the subkey for the corresponding Office XP application.

This subkey must be added to the following registry subkey, where appname is the name of the application in which the add-in will run:

\HKEY_CURRENT_USER\SOFTWARE\Microsoft\Office\appname\AddIns

The new subkey itself must be the programmatic identifier of the COM add-in, which consists of the name of the project followed by the name of the class module or add-in designer. For example, the registry subkey for the Image Gallery add-in for Microsoft® Word would be ImageGallery.dsrImageWord.

The following table describes the entries that you can add beneath this subkey. Only the LoadBehavior entry is required; the others are optional.

Name Type Value
Description String Name to appear in COM Add-ins dialog box
FriendlyName String String returned by Description property
LoadBehavior DWORD Integer indicating load behavior: 0 (None), 3 (Startup), 9 (Load on Demand), or 16 (Load At Next Startup Only)

See Also

Making the DLL