Skip to content

Files

Latest commit

 

History

History
87 lines (50 loc) · 2.71 KB

PowerPoint.Presentations.md

File metadata and controls

87 lines (50 loc) · 2.71 KB
title keywords f1_keywords api_name ms.assetid ms.date ms.localizationpriority
Presentations object (PowerPoint)
vbapp10.chm522000
vbapp10.chm522000
PowerPoint.Presentations
0b952edc-8628-71ef-e854-3bcefbb3bc61
06/08/2017
medium

Presentations object (PowerPoint)

A collection of all the Presentation objects in Microsoft PowerPoint. Each Presentation object represents a presentation that's currently open in PowerPoint.

Remarks

The Presentations collection doesn't include open add-ins, which are a special kind of hidden presentation. You can, however, return a single open add-in if you know its file name. For example Presentations("oscar.ppa") will return the open add-in named "Oscar.ppa" as a Presentation object. However, it is recommended that the AddIns collection be used to return open add-ins.

If your Visual Studio solution includes the Microsoft.Office.Interop.PowerPoint reference, this collection maps to the following types:

  • Microsoft.Office.Interop.PowerPoint.Presentations.GetEnumerator (to enumerate the Presentation objects.)

Example

Use the Presentations property to return the Presentations collection. Use the Add method to create a new presentation and add it to the collection. The following example creates a new presentation, adds a slide to the presentation, and then saves the presentation.

Set newPres = Presentations.Add(True) 
newPres.Slides.Add 1, 1 
newPres.SaveAs "Sample"

Use Presentations (index), where index is the presentation's name or index number, to return a single Presentation object. The following example prints presentation one.

Presentations(1).PrintOut

Use the Open method to open a presentation and add it to the Presentations collection. The following example opens the file Sales.ppt as a read-only presentation.

Presentations.Open FileName:="sales.ppt", ReadOnly:=True

Methods

Name
Add
CanCheckOut
CheckOut
Item
Open
Open2007

Properties

Name
Application
Count
Parent

See also

PowerPoint Object Model Reference

[!includeSupport and feedback]