Opening a PowerPoint presentation with VBA

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have the filepath and filename of several presentations that I'd like to
open programmatically. How would I do that?

Thanks
 
Barb Reinhardt said:
I have the filepath and filename of several presentations that I'd like to
open programmatically. How would I do that?

Dim sFileName as String
sFileName = "c:\temp\whatever.ppt"
Presentations.Open(sFileName)

Or for all of them at once ...

Dim aFileNames(1 to 10) as String
Dim x as Long

aFileNames(1) = "first filename"
aFileNames(2) = "second filename"
' ... etc

For x = 1 to UBound(aFileNames)
Presentations.Open(aFileNames(x))
Next
 
Back
Top