Presentations Collection Object

See Also         Properties         Methods

Application object
Presentations collection (Presentation object)
Multiple objects

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

Using the Presentations Collection

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

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.