PDA

View Full Version : VBA Code to Exit Active Powerpoint Presentation And Launch Another Powerpoint File



lneidorf
06-25-2007, 09:05 AM
Hi there.

I've created an extensive organization chart that spans many slides and files. I have broken things up and used hyperlinks to allow the user to navigate seamlessly between files as if they were all one presentation.

It only recently dawned on me that as the user clicks on various hyperlinks, effectively opening multiple files, that all the files are open and remain in memory. This creates two problems: 1) a memory issue, given the multitude of Powerpoint files that could be open; and 2) a problem with exiting the slideshows as the user has to repeatedly hit the Esc key for each file that is open. That would be burdensome if 25+ files are open.

Thus I thought to supplement the hyperlinks between files with a VBA macro that will close the active presentation in addition to navigating to the desired file. Theses macros would be triggered when the user clicks on an autoshape.

Let's say File1.ppt is open and in slideshow mode. The user sees an Org Chart with three subordinates, each containing a hyperlink to another Powerpoint file. Let's say Org Chart subordinate 1 is linked to File2.ppt. I want a way to get File1.ppt to close and File2.ppt to launch in slideshow mode when the user clicks on the subordinate 1 object.

Any thoughts would be greatly appreciated.

Thanks!

Paul_Hossler
06-26-2007, 07:37 PM
Why don't you want to keep everything in a single PPT file? (other than size)?

If there's macros in the linked slide shows, you'd get a macro warning each time.

My 2 cents is that you'd have better control with everything in a single PPT with Action Buttons or Shapes with a hyperlink action to take the user where they wanted to go or exist. ALso no macro warnings to worry about.

lneidorf
06-27-2007, 07:39 AM
One file would be huge. As it stands, I have about 190 files, most about 70 slides in size. I had to break them up becaus one file was just too large. Again, a memory issue. Furthermore, Powerpoint 2003 has a modest limitation as to the number of hyperlinks that any one file may contain and I was well in excess of the limit. The hyperlink limitation is what guided my decisions as to how to split things up.

Paul_Hossler
06-27-2007, 09:25 AM
That's a whole lot'a slides - the little test I tried with macros in each "sub-presentation" got the macro warning each time, and I didn't like that.

John Wilson
07-12-2007, 02:52 AM
The vba would be simple code however as Paul says unless you have security set to low you will get warning messages.

How about having a switchboard slide(s) with the main "menu" and then having "end show" buttons on all other shows to return to it?