How to open a PPS using a macro?

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

Guest

I'd appreciate some help creating a macro to open a seperate PPS from a PPS
that is already running. I'm not sure that this is possible. I am able to
create a macro that works while the PowerPoint application is running however
if I launch the PPS without the PowerPoint application running minimized the
macro doesn't work. I think this has something to do with the behavior of
the Presentations object.

Thanks.
 
Dtithisisron said:
I'd appreciate some help creating a macro to open a seperate PPS from a PPS
that is already running. I'm not sure that this is possible. I am able to
create a macro that works while the PowerPoint application is running however
if I launch the PPS without the PowerPoint application running minimized the
macro doesn't work. I think this has something to do with the behavior of
the Presentations object.

Post the code if you can. Otherwise we're just guessing.
 
Steve Rindsberg said:
Post the code if you can. Otherwise we're just guessing.

Here's what I came up with so far. Like I was saying, it works if the
PowerPoint application is running in the background (then you launch the show
from Explorer) but not if you close the application then launch the show from
Explorer.

Presentations.Open ("2.pps")
With Application.Presentations("1.pps")
.Saved = True
.Close
End With

Both of the files are in the same folder.

Thanks.
 
Dtithisisron said:
Here's what I came up with so far. Like I was saying, it works if the
PowerPoint application is running in the background (then you launch the show
from Explorer) but not if you close the application then launch the show from
Explorer.

Presentations.Open ("2.pps")
With Application.Presentations("1.pps")
.Saved = True
.Close
End With

Both of the files are in the same folder.

Running presentations from w/in Explorer is a bit different than from w/in PPT..

What if you put a msgbox in there to see if it runs at all.

Also, what are you trying to accomplish? Open one show and close another, of
course, but could this be done with links instead of VBA?
 
Steve Rindsberg said:
Running presentations from w/in Explorer is a bit different than from w/in PPT..

What if you put a msgbox in there to see if it runs at all.

Also, what are you trying to accomplish? Open one show and close another, of
course, but could this be done with links instead of VBA?

Putting in a msgbox shows that the macro begins to run. I put a msgbox in
at the beginning and end. Only the first one worked. The macro stops on the
line where it tries to access the Presentations object. Do you think this
object is unavailable without the PowerPoint application running?

The overall goal is to take an extremely large presentation and break it
down into smaller PPS's. The full version, although it contains everything
the client wants, often crashes their machines. The idea was to open the
next section and close the current section in a single click...as if just
advancing to the next slide (transparent to the audience and presenter).

If there are better ways of doing this I'm open to ALL of them!

Thanks.
 
Putting in a msgbox shows that the macro begins to run. I put a msgbox in
at the beginning and end. Only the first one worked. The macro stops on the
line where it tries to access the Presentations object. Do you think this
object is unavailable without the PowerPoint application running?

It seems so. On the other hand, what's running the macro if PowerPoint isn't
running? I'm a bit confused by this.
The overall goal is to take an extremely large presentation and break it
down into smaller PPS's. The full version, although it contains everything
the client wants, often crashes their machines. The idea was to open the
next section and close the current section in a single click...as if just
advancing to the next slide (transparent to the audience and presenter).

If there are better ways of doing this I'm open to ALL of them!

If the navigation needs of the presentation allow, start the presentation on a
single-slide menu presentation. It contains links to other presentations. User
clicks link, second pres opens atop the first; when the second presentation ends
(ie, they clicked your End button that triggers an End Show action setting) it
closes, leaving you back on the menu slide. Very light weight and needs no macros.
 
Steve Rindsberg said:
It seems so. On the other hand, what's running the macro if PowerPoint isn't
running? I'm a bit confused by this.

I don't know. I was hoping that you or someone else could answer a question
like that. When you launch a PPS the POWERPNT.EXE process runs and you can
see it in taskmgr...same as when you launch the application from the start
menu. However, it seems to behave differently.
If the navigation needs of the presentation allow, start the presentation on a
single-slide menu presentation. It contains links to other presentations. User
clicks link, second pres opens atop the first; when the second presentation ends
(ie, they clicked your End button that triggers an End Show action setting) it
closes, leaving you back on the menu slide. Very light weight and needs no macros.

We've considered structuring it this way. The client would prefer if it
stayed in a sequential structure rather than returning to an outline slide.
That's why I'm exploring if it is possible. If it is not then we will either
do the outline method or launch the first segment as a PPT with the full
application open and use a macro to open the next PPS.

If anybody can think of a different way to write the Macro code so it isn't
dependant on the application being open I'd appreciate it.

Thanks.
 
I don't know. I was hoping that you or someone else could answer a question
like that. When you launch a PPS the POWERPNT.EXE process runs and you can
see it in taskmgr...same as when you launch the application from the start
menu. However, it seems to behave differently.

We can't give good answers w/o a much more detailed and accurate description of what 's
going on. You're too far away and my eyes are too bad for me to see over your
shoulder. :-) We only have your descriptions to go by; don't be shy about describing
every step of what you're doing. Nobody will be insulted by too much detail.

You say "when you launch a PPS" ... launch it how? Browser link or doubleclick from
within Win explorer or ???
We've considered structuring it this way. The client would prefer if it
stayed in a sequential structure rather than returning to an outline slide.
That's why I'm exploring if it is possible. If it is not then we will either
do the outline method or launch the first segment as a PPT with the full
application open and use a macro to open the next PPS.

If anybody can think of a different way to write the Macro code so it isn't
dependant on the application being open I'd appreciate it.

Macros will not run without the application open.

If installing an addin is practical, have a look here:
http://skp.mvps.org/sngsswnd.htm

Might do just what you're after
 
Steve Rindsberg said:
We can't give good answers w/o a much more detailed and accurate description of what 's
going on. You're too far away and my eyes are too bad for me to see over your
shoulder. :-) We only have your descriptions to go by; don't be shy about describing
every step of what you're doing. Nobody will be insulted by too much detail.

You say "when you launch a PPS" ... launch it how? Browser link or doubleclick from
within Win explorer or ???

I have a folder with multiple PPS files in it. I double click on one of
them in windows explorer. I go through the show. The last slide in the show
has a button that runs a macro (the macro code was posted in an earlier
post). The macro is supposed to open one of the other PPS shows in the
folder and close the current PPS. The macro doesn't work.

HOWEVER, say I am doing some editing in PowerPoint. Then I finish, save my
file, and close ALL open files in PowerPoint (there is nothing on my screen
but a grey background and toolbars). Then I double click the SAME PPS as in
the previous scenario in windows explorer. I'll go through the show and
click on the button on the last slide. This time THE MACRO WILL RUN.
Opening the next PPS and closing the current PPS.

This has led me to believe that the PowerPoint application needs to be
running for this particular macro to work. However, in both cases, if you
look at taskmgr during the first show POWERPNT.EXE is running. I guess maybe
different parameters are used to run the executable at the time of the
double-click? Regardless, we do know that macros are saved in PPS files and
do in fact run when only double-clicking the file in Explorer (NOT having the
full application open). To verify this I created a macro in a PPS to display
a msgbox. I ran the file (and macro) without the PowerPoint application
running.

So!....I think that there must be some other way to write a macro, using
different code than I have written, to open a PPS and close a PPS.
Macros will not run without the application open.

The msgbox macro worked.
If installing an addin is practical, have a look here:
http://skp.mvps.org/sngsswnd.htm

Might do just what you're after

I'll look into this.

Thanks again!
 
Ah, thanks. Much clearer. See comments interspersed ....

I have a folder with multiple PPS files in it. I double click on one of
them in windows explorer. I go through the show. The last slide in the show
has a button that runs a macro (the macro code was posted in an earlier
post). The macro is supposed to open one of the other PPS shows in the
folder and close the current PPS. The macro doesn't work.

HOWEVER, say I am doing some editing in PowerPoint. Then I finish, save my
file, and close ALL open files in PowerPoint (there is nothing on my screen
but a grey background and toolbars). Then I double click the SAME PPS as in
the previous scenario in windows explorer. I'll go through the show and
click on the button on the last slide. This time THE MACRO WILL RUN.
Opening the next PPS and closing the current PPS.

This has led me to believe that the PowerPoint application needs to be
running for this particular macro to work. However, in both cases, if you
look at taskmgr during the first show POWERPNT.EXE is running. I guess maybe
different parameters are used to run the executable at the time of the
double-click? Regardless, we do know that macros are saved in PPS files and
do in fact run when only double-clicking the file in Explorer (NOT having the
full application open). To verify this I created a macro in a PPS to display
a msgbox. I ran the file (and macro) without the PowerPoint application
running.

The application is running in either case. PPS and PPT files are identical except for the
extension. Because the extension is different, Windows fires them off differently and
apparently PPT itself may do the same. When you doubleclick a PPT, it opens PPT and loads
the PPT file. When you doubleclick a PPS, it opens PPT loads the file and immediately goes
into slideshow mode. And ... possibly key point here:

When you've started a slide show from normal editing modes in PPT, you return to the same
mode when the slide show ends. When you start a PPS and go immediately into slideshow view,
you return to Windows when the show ends. PPT starts, displays the show w/o ever showing
itself, then disappears.

Apparently that behavior takes precedence over fininshing any running macros. You say close
the show, it closes the show and quits. If the next command happens to be "Start the next
show" .... it never sees that.
So!....I think that there must be some other way to write a macro, using
different code than I have written, to open a PPS and close a PPS.

How about Show A which has a link to start Show B. Show B has a macro that loads Show C
then quits Show B.
 
Steve Rindsberg said:
The application is running in either case. PPS and PPT files are identical except for the
extension. Because the extension is different, Windows fires them off differently and
apparently PPT itself may do the same. When you doubleclick a PPT, it opens PPT and loads
the PPT file. When you doubleclick a PPS, it opens PPT loads the file and immediately goes
into slideshow mode. And ... possibly key point here:

When you've started a slide show from normal editing modes in PPT, you return to the same
mode when the slide show ends. When you start a PPS and go immediately into slideshow view,
you return to Windows when the show ends. PPT starts, displays the show w/o ever showing
itself, then disappears.

Apparently that behavior takes precedence over fininshing any running macros. You say close
the show, it closes the show and quits. If the next command happens to be "Start the next
show" .... it never sees that.


How about Show A which has a link to start Show B. Show B has a macro that loads Show C
then quits Show B.

When does show A get closed in this scenario? The code I orginally wrote
has the line for opening the first show before closing the currnet one. Do
you think there needs to be some type of pause in between to provide time for
the second show to finish loading?
 
Dtithisisron said:
When does show A get closed in this scenario?

It doesn't. Or rather it stays open in the background until the last of the
"chained" shows closes. You'd want an End Show button on Show A so the user
can quit it gracefully as well.
The code I orginally wrote
has the line for opening the first show before closing the currnet one. Do
you think there needs to be some type of pause in between to provide time for
the second show to finish loading?

It's worth a try but personally, I'd simply *expect* weirdness to happen when
terminating the presentation that contains the code I'm running. And not do it
that way. ;-)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top