Creating Visio COM Add-ins with Visual Studio 2005

The Add-in/Add-on wizards that shipped with the Visio 2003 SDK are designed for Visual Studio 2003. They don’t work with Visual Studio 2005. You can still easily create Visio COM add-ins in VS2005 with just a couple extra steps by using the Shared Add-in Wizard:

1.
2. Select File>New>Project.

  1. For Project types, choose the Extensibility category under "Other Project Types," then choose "Shared Add-in:"

        

  2. Click next on the welcome screen, then choose the language you want to use:

        

  3. On the next page, uncheck everything except for "Microsoft Visio."

        

  4. You can give your Add-in a name and description that will show up in Visio:

        

  5. Check the first box to have the Add-in load when Visio loads. If you check the second option, the user still has the option at install time to make it available to everyone or just themselves.

        

  6. Click finish on the last page. You’ll end up with two projects – the Add-in itself and an installation project.

        

  7. Right click on the References section under the Add-in project and select "Add Reference…" Then, click on the COM tab in the dialog and select "Microsoft Visio 11.0 Type Library" from the list. You may want to import the Microsoft.Office.Interop.Visio namespace as well. For more details about developing COM Add-ins for Visio, you might want to check out the Managed Code Tutorial in the Visio 2003 SDK.

If you want to create a Visio Add-on (DLL or EXE), the best method of doing so right now is to create a project in Visual Studio 2003 and then open it in Visual Studio 2005 – you will be given the chance to upgrade the project.