Microsoft Office 2000/Visual Basic Programmer's Guide |
You can also use the Presentations collection's Open method to open a presentation saved to disk and create a reference to that presentation at the same time. The following example opens the PowerPointTools.ppt presentation:
Dim ppApp As PowerPoint.Application
Dim prsPres As PowerPoint.Presentation
Set ppApp = New PowerPoint.Application
Set prsPres = ppApp.Presentations.Open("c:\opg\Samples\CH05\PowerPointTools.ppt")
With prsPres
' Code to manipulate presentation and its
' contents goes here.
End With