Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

Presentations Object

Office 2007
A collection of all the Presentation objects in Microsoft Office 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.

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.

Visual Basic for Applications
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.

Visual Basic for Applications
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.

Visual Basic for Applications
Presentations.Open FileName:="sales.ppt", ReadOnly:=True



Community Additions

Show:
© 2014 Microsoft