Page 283 - Microsoft Office Excel 2003 Programming Inside Out
P. 283

Creating Add-Ins and COM Add-Ins

                    Running the Shared Add-In Wizard
                             The easiest way to create an add-in is to use the Microsoft Visual Studio .NET Shared Add-in
                             Wizard. This will create a new solution for you that includes all the pieces needed to run your
                             add-in, including the logic to automatically add the registry keys.
                             The solution consists of two projects. The first project contains the code necessary to interact
                             with the application, which you can use as a basis for building the add-in itself. The second
                             project is an installation project, which will install the add-in including any necessary
                             changes to the registry.
                             Follow these steps to create a new add-in solution:

                               1	 Create a New Project in Visual Studio .NET. When prompted to choose the type of
                                  project, expand the Other Projects icon and select Extensibility Projects as the Project
                                  Type and then select the Shared Add-In template. Enter values for the project’s Name
                                  and Location. Press the OK button to start the wizard.
























                               2	 The wizard will prompt you to choose which language you want to use. You can
                                  choose from Microsoft Visual C#, Visual Basic, or Visual C++/ATL. Select Visual
                                  Basic, and press the Next button.                                          Chapter 11
                               3	 On Page 2 of the wizard, you’ll be prompted to choose which applications will host the
                                  add-in.













                                                                                                       257
                                                                                                Part 4:  Advanced VBA
   278   279   280   281   282   283   284   285   286   287   288