Megosztás a következőn keresztül:


Getting Started Programming Application-Level Add-Ins

You can use add-ins to automate Microsoft Office applications, extend features of the application, and customize the user interface (UI) of the application. For information about how add-ins compare to other types of Office solutions you can create by using Visual Studio, see Office Solutions Development Overview.

Applies to: The information in this topic applies to application-level projects for Microsoft Office 2013 and Microsoft Office 2010. For more information, see Features Available by Office Application and Project Type.

Creating Add-in Projects

Create add-in projects by using one of the Office add-in project templates in the New Project dialog box. These templates include required assembly references and project files. Visual Studio provides add-in project templates for most applications in Office 2010.

For more information about how to create an add-in project, see How to: Create Office Projects in Visual Studio. For more information about the project templates, see Office Project Templates Overview.

Developing Add-in Projects

When you create an add-in project, Visual Studio automatically creates a ThisAddIn.vb (in Visual Basic) or ThisAddIn.cs (in C#) code file. This file contains the ThisAddIn class, which provides the foundation for your add-in. You can use members of this class to run code when the add-in is loaded or unloaded, to access the object model of the host application, and to extend features of the application. For more information, see Programming Application-Level Add-Ins.

Automating Applications by Using the Object Models

The object models of Microsoft Office applications expose many types that you can program against in an add-in. You can use these types to automate the application. For example, you can programmatically create and send an e-mail message in Outlook, or you can open a document and add content in Word. For more information about how to access the object model of the host application in code, see Programming Application-Level Add-Ins.

For more information about the object models of specific Microsoft Office applications, see the following topics:

Customizing the User Interface of Applications

There are several different ways to customize the UI of the host application by using an add-in:

For more information about how to customize the UI of Microsoft Office applications, see Office UI Customization.

Next Steps

To learn how to create application-level add-ins, see the following walkthroughs:

These walkthroughs introduce you to the Office development tools in Visual Studio and the programming model for application-level add-ins.

For a list of topics that walk you through some of the common tasks in Office projects, see Common Tasks in Office Programming.

See Also

Tasks

How to: Create Office Projects in Visual Studio

Concepts

Writing Code in Office Solutions

Architecture of Application-Level Add-Ins

Other Resources

Getting Started (Office Development in Visual Studio)

Programming Application-Level Add-Ins