Use Add-in Express. NET to create a COM Add-on Project

Source: Internet
Author: User

UseAdd-in Express for Office and. NETCreating a COM add-on project is not complex. The following describes how to create a COM add-on project.

Make sure that you have administrative permissions before running Visual Studio. In addition, if you have Windows Vista, Windows 7, Windows Server 2008, and Windows 8, run Visual Studio as an administrator.

In Visual Studio, open the new project dialog box and navigate to the extension folder.

Select Add-in Express COM Add-in and click OK.

This will start the COM add-on Project Wizard. It allows you to select a programming language and specify the oldest Office version required by your add-on.

Selecting a special Office version will add the corresponding interactive operations for this project. Later, you can replace the interactive operation in your project.

If you have any questions, select Microsoft Office 2000 as the minimum supported version.

Select your programming language and the lowest Office version you need to support, and then click Next.

The wizard allows you to create add-on projects for several Office applications.

You can select one or more Microsoft Office applications in the preceding window. For each selected application, the Project Wizard will do the following:

  1. Copy the corresponding interactive operation assembly to the interactive operation directory of your project folder,

  2. Add a reference set for the project

  3. . Add a COM add-on module to the project.

  4. Set Properties of the SupportedApp add-on Module

  5. Add an attribute to the add-on module. This attribute name reflects the name of the selected Office application. You will use this attribute to access the object model of the Office application and load your add-on.

Select the Office applications supported by your add-on and click Next.

The wizard allows you to specify a strong naming file, which is used to determine your add-on set.

If you do not have a specific strong-name key file, select Generate new. If you have any questions, select Generate new. If, later, you need to use a strong naming key file, specify its name on the Signing tag of your project properties; if you use another strong name tag, you need to log out of your add-on project.

Select Generate new or specify an existing. snk file and click Finish.

The Project Wizard creates and opens a new solution in IDE.

This solution contains a unique project, COM add-on project. This add-on project contains the AddinModule. vb (or AddinModule. cs) file.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.