Dela via


PowerPoint Solutions

Applies to

The information in this topic applies only to the specified Visual Studio Tools for Office projects and versions of Microsoft Office.

Project type

  • Application-level projects

Microsoft Office version

  • PowerPoint 2003

  • PowerPoint 2007

For more information, see Features Available by Application and Project Type.

Visual Studio Tools for Office 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 (Visual Studio Tools for Office).

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 a Visual Studio Tools for Office add-in, use the Application field of the ThisAddIn class in your project. The Application field returns a Microsoft.Office.Interop.PowerPoint.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 Visual Studio Tools for Office 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 information about the classes you can use in the PowerPoint object model, see the following sets of documentation:

This documentation provides information about the PowerPoint object model as it is exposed to Visual Basic for Applications (VBA) code. These descriptions of objects and members also apply to the corresponding classes in the primary interop assemblies. For example, the Presentation object in the PowerPoint VBA documentation corresponds to the Microsoft.Office.Interop.PowerPoint.Presentation class in the primary interop assembly.

Note

At this time, there is no reference documentation for the PowerPoint primary interop assemblies.

Additional Types in Primary Interop Assemblies

As you write code that uses the primary interop assemblies, you might notice many types that are not described in the VBA reference. These additional types help translate objects in the COM-based object model of PowerPoint to managed code, are not intended to be used directly in your code.

For more information, see Overview of Classes and Interfaces in the Office Primary Interop Assemblies.

Customizing the User Interface of PowerPoint

The PowerPoint 2007 UI is different from the PowerPoint 2003 UI, so you have different customization options.

PowerPoint 2007

Task

For more information

Create a custom task pane.

Custom Task Panes Overview

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

PowerPoint 2003

Task

For more information

Add custom toolbars and toolbar items.

How to: Create Office Toolbars Programmatically

Add menus and menu items.

How to: Create Office Menus Programmatically

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 Visual Studio Tools for Office Projects

Concepts

Getting Started Programming Application-Level Add-Ins

Office Solutions Development Overview

Architecture of Application-Level Add-Ins

Programming Application-Level Add-Ins

Writing Code in Office Solutions

Office UI Customization

Reference

Office Primary Interop Assemblies

Welcome to the Microsoft Office PowerPoint 2007 Developer Reference

Welcome to the Microsoft Office PowerPoint 2003 VBA Language Reference