Deploying Office Application-Specific Add-ins

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.

The AddIns folder under C:\Windows\Application Data\Microsoft, C:\Windows\Profiles\UserName\Application Data\Microsoft, C:\Winnt\Profiles\UserName\Application Data\Microsoft, or C:\Documents and Settings\UserName\Application Data\Microsoft is the default folder for Microsoft® Word, Microsoft® Excel, Microsoft® PowerPoint®, and Microsoft® Access application-specific add-ins. The simplest way to deploy an application-specific add-in, of course, is to e-mail the add-in to users or to post it on a network share with instructions for copying it to the correct folder. There is nothing wrong with this approach; however, you cannot guarantee that users will copy the add-in correctly, especially if the add-in has any dependent files that might have to be installed to a different folder. If you must have more control over the installation process, you can create a custom setup program to install the application correctly.

Building such a setup program is relatively simple. Although you can build a setup program from any Microsoft® Visual Basic® for Applications (VBA) host application, Visual Basic is optimal because you can create an executable (.exe) file.

The most difficult aspect of building a custom setup program is determining the path to the Templates and AddIns folders on users' computers. To determine the location of the Templates and AddIns folders, you must call three Microsoft® Windows® application programming interface (API) functions. These functions are SHGetSpecialFolderLocation, SHGetPathFromIDList, and SHGetMalloc.

See Also

The Packaging Process | Creating a Setup Package Using the Packaging Wizard | Deploying Your Application | Packaging Wizard | Testing Your Setup Package