Switching between multiple Presentations using Visual Basis

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

Guest

I have about 30 PowerPoint presentation building via VB at one time. I want
to know how to activate one by calling it's saved filename
E.g.
Presentation 1
Presentation 2
Presentation 3
...
Presentation 30
If I am currently in presentation 3, what is the VB code to call up
Presentation 30?
 
Ken,
Your question is not quite clear. How are you building 30 presentations at
one time? Is it a batch process. What do you mean by call up presentation30?
Is the presentation already created on disk?
 
Shyam
The presentations will be built by VBA code from Excel (I know how to do
this) but what I'm unsure about is the PowerPoint VBA code I need to switch
from the current presentation window(say Presentation 30) to one of the other
open presentations.

Windows.Item(Index:=2).Activate is on way of doing this but I want to use
the filename, not an Index number. Can you help?
Thanks KEN
 
Shyam
The presentations will be built by VBA code from Excel (I know how to do
this) but what I'm unsure about is the PowerPoint VBA code I need to switch
from the current presentation window(say Presentation 30) to one of the other
open presentations.

Windows.Item(Index:=2).Activate is on way of doing this but I want to use
the filename, not an Index number. Can you help?

Try something along these lines:

Sub ActivateByName(strName as String)

Dim x as Long

For x = 1 to Windows.Count
If Windows(x).Presentation.Name = strName Then
Windows(x).Activate
End if
Next

End Sub
 
Back
Top