Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PowerPoint - Run a new slide show when one ends 1

Status
Not open for further replies.

DLG0311

Technical User
Jan 6, 2005
13
GB
I have two speakers one after another and want a smooth transition between them. I don't want to join the two presentations together, so I'd like a macro that runs as the last slide of the first presentation ends that runs the new presentation.

#Presentations.Open FileName:="CPT Jenni Whitehead presentation.pps"# wil actually run the new presentation, but I cannot get this to run as the last slide ends.

How can I do it?
 
Hi DLG0311

If it's possible, a much simpler solution is to place a hyperlink to the second presentation on the last slide of the first presentation.

If there are no objects on the last slide that the first presenter needs to click on, you could draw an invisible rectangle across the whole page which, when clicked, starts the second presentation; or alternatively, you could place a small, discreet graphic in the bottom corner of the last slide to contain the hyperlink.

You could ask your first presenter to click the link at the end of his/her presentation, and the title slide of your second presenter would be waiting for her when she gets up to speak.

Hope this helps!

Mac
 
Thanks, tried this.

Works well EXCEPT at the end of the second presentation the Hyperlink "unwinds" and goes back to the last slide of the first presentation where it came from - possible cause for confusion(?), especially if presenter has clicked too often!
 
Okay -- I can get you some of the way there.

In the VBE, create a new Class Module (call it Class1) and enter the following code.

Code:
Public WithEvents App As Application

Private Sub App_SlideShowEnd(ByVal Pres As Presentation)

MsgBox "This is a message"

End Sub

Then create a normal module and create the following

Code:
Dim MyApp As New Class1

Sub InitializeApp()
    
    Set MyApp.App = Application
    
End Sub

Run the InitializeApp procedure from the VBE, then switch back to PowerPoint and hit F5 for the slideshow. At the end of the slideshow, you should get the messagebox appearing, thereby recognising the SlideShowEnd event.

I haven't managed to open a second presentation at this point, however.

Good luck!

Mac
 
Hi - back at my desk!

You've probably managed to complete the problem already, but if you ditch the MsgBox line and add the following lines to your CLASS1 class module (supplying the appropriate file names), you can seamlessly jump to a second presentation in slideshow mode.

Code:
If ActivePresentation.Name = "TEST1.ppt" Then

    Presentations.Open "TEST2.ppt"
        With ActivePresentation.SlideShowSettings
            .Run
        End With

End If

Hope this helps!

Mac
 
This works too

Presentations.Open FileName:="CPT Jenni Whitehead presentation.pps"

Thanks very much, the event went well and the change worked!

One issue that arose was that using your system the last slide of the second presentation also runs the macro and so the second presentation repeats. Presumably I could avoid that in future with a check to see what presentation is running and if it is the last one in the line "Exit Sub"?

For the future, is there an "AutoOpen" type macro in PP whereby the macros runs when the slideshow begins so the first presenter would not have to go in and run the "InitializeApp" macro manually?

Once again, many thanks for input
 
Great! I'm glad the event went well.

Re the issue with the second presentation running the macro, the code ...
Code:
If ActivePresentation.Name = "TEST1.ppt" Then
... performs a test so that the procedure only runs after the first slideshow ends. The alternative would be to test for the name of your last presentation and then exit the procedure at that point.

As for an AutoExec macro - PowerPoint doesn't have its own but it can be constructed - see (this would also have helped us with our original problem!)

HTH

Mac
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top