Compartir a través de


PowerPoint Solutions

Visual Studio provides project templates you can use to create application-level add-ins for Microsoft Office PowerPoint. You can use add-ins to automate PowerPoint, extend PowerPoint features, or customize the PowerPoint user interface (UI).

For more information about application-level add-ins, see Getting Started Programming Application-Level Add-Ins and Architecture of Application-Level Add-Ins. If you are new to programming with Microsoft Office, see Getting Started (Office Development in Visual Studio).

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

link to video For a related video demonstration, see How Do I: Create an Add-in for Microsoft PowerPoint?.

Automating PowerPoint by Using the PowerPoint Object Model

The PowerPoint object model exposes many types that you can use to automate PowerPoint. These types enable you to write code to accomplish common tasks:

  • Programmatically create and format presentations.

  • Add or remove slides from presentations.

  • Add or change shapes on a slide.

To access the PowerPoint object model from an add-in, use the Application field of the ThisAddIn class in your project. The Application field returns a Application object that represents the current instance of PowerPoint. For more information, see Programming Application-Level Add-Ins.

When you call into the PowerPoint object model, you use types that are provided in the primary interop assembly for PowerPoint. The primary interop assembly acts as a bridge between the managed code in the add-in and the COM object model in PowerPoint. All types in the PowerPoint primary interop assembly are defined in the Microsoft.Office.Interop.PowerPoint namespace. For more information about primary interop assemblies, see Office Solutions Development Overview and Office Primary Interop Assemblies.

Using the PowerPoint Object Model Documentation

For complete information about the PowerPoint object model, you can refer to the PowerPoint primary interop assembly (PIA) reference and the VBA object model reference.

Primary Interop Assembly Reference

The PowerPoint PIA reference documentation describes the types in the primary interop assembly for PowerPoint. This documentation is available from the following location: PowerPoint 2010 Primary Interop Assembly Reference.

For more information about the design of the PowerPoint PIA, such as the differences between classes and interfaces in the PIA and how events in the PIA are implemented, see Overview of Classes and Interfaces in the Office Primary Interop Assemblies.

VBA Object Model Reference

The VBA object model reference documents the PowerPoint object model as it is exposed to Visual Basic for Applications (VBA) code. For more information, see PowerPoint 2010 Object Model Reference

All of the objects and members in the VBA object model reference correspond to types and members in the PowerPoint primary interop assembly (PIA). For example, the Presentation object in the VBA object model reference corresponds to the Presentation type in the PowerPoint PIA. Although the VBA object model reference provides code examples for most properties, methods, and events, you must translate the VBA code in this reference to Visual Basic or Visual C# if you want to use them in a PowerPoint add-in project that you create by using Visual Studio.

Customizing the User Interface of PowerPoint

You can modify the UI of PowerPoint in the following ways.

Task

For more information

Create a custom task pane.

Custom Task Panes

Add custom tabs to the Ribbon.

Ribbon Overview

Add custom groups to a built-in tab on the Ribbon.

How to: Customize a Built-in Tab

For more information about customizing the UI of PowerPoint and other Microsoft Office applications, see Office UI Customization.

See Also

Tasks

Walkthrough: Creating Your First Application-Level Add-in for PowerPoint

How to: Create Office Projects in Visual Studio

Reference

Office Primary Interop Assemblies

Concepts

Getting Started Programming Application-Level Add-Ins

Office Solutions Development Overview

Architecture of Application-Level Add-Ins

Writing Code in Office Solutions

Other Resources

Programming Application-Level Add-Ins

Office UI Customization

PowerPoint 2010 in Office Development