Share via


Working with Open Presentations

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

You create a reference to an open presentation in two ways: by using the Application object's ActivePresentation property or by accessing a Presentation object as a member of the Presentations collection. There are three ways you can access a Presentation object through the Presentations collection:

  • By using the presentation's file name.
  • By using the Caption property setting of the Window object that contains the presentation.
  • By using the presentation's index value. Microsoft® PowerPoint® presentations are indexed in the order in which they are opened.

The following examples illustrate the different ways to set a reference to an open presentation:

Dim prsPres As PowerPoint.Presentation

' Use the ActivePresentation property.
Set prsPres = ActivePresentation

' Use the presentation's file name.
Set prsPres = Presentations("PowerPointTools.ppt")

' Use the Caption property setting of the Window 
' object that contains the presentation.
Set prsPres = Presentations("PowerPointTools")

' Use the presentation's index value in the collection.
Set prsPres = Presentations(1)

See Also

Working with the Presentation Object | Working with Existing Presentations | Creating a New Presentation | Formatting a Presentation | Running a Slide Show from a Presentation