PDA

View Full Version : Launching another presentation using VBA


rutledj
01-22-2003, 10:48 AM
Can someone show me the proper way, using vba code, to launch open another slide from the main (1st) slide in a presentation?

I'm currently using this:

With Application
.ActivePresentation.FollowHyperlink goodPath, , False, False
wend

where goodpath is the complete path to the next slide.

This works but not always.


Also, in the secondary slide if I want to exit and go back to the main (1st) slide I'm using this code:

me.hide

For Each oSlideShowWindow In Application.SlideShowWindows
If UCase$(oSlideShowWindow.Presentation.Name) = "MAIN.PPT" Then
oSlideShowWindow.Activate
Exit For
End If
Next

Is this the proper way to close the current presentation and go back to the main slide?

Thanks,
Rut

Anne Troy
01-22-2003, 06:23 PM
Hi there, rut.

Wouldn't it be easier to use a hyperlink instead of code?

:D

rutledj
01-22-2003, 08:19 PM
Perhaps but the reason I'm doing it this way is because the main.ppt might be copied to the hd while the remaining slides are read off the cd. I don't know why they need to do it this way but they do. In that case, a hyperlink wouldn't find it.






Originally posted by Dreamboat
Hi there, rut.

Wouldn't it be easier to use a hyperlink instead of code?

:D

Anne Troy
01-22-2003, 08:33 PM
Yes. VERY BAD Setup. Maybe some VBAers will come in here. Otherwise, about all I can do is:

Offer to test your presentation out in 97, 2K and/or XP.
Change the name of your title.

If we say using VBA, that'll attract the more adventurous coders. You see, they might not know PowerPoint well, but they might know VBA very well.

I'll take the liberty and change the Q title.

Good luck!