If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
How does one repeatedly show/hide a given presentation?
I posted an earlier question about toggling the read-only state of a
presentation, this post is similar. From within our application, I would like to be able to repeatedly toggle the visible state of a PowerPoint presentation. To open the presentation in a "hidden" state, I can make this call: pptPres = ppApp.Presentations.Open ("path to PPT", msoFalse, // allow changes msoFalse, // not untitled msoFalse); // without window To make the presentation visible, I can make this call: pptPres.NewWindow(); If I want to toggle it to hidden again, it seems that my only option is to close the window: pptPres.Windows.Item(1).Close(); At this point, I'm stuck - because closing the last window for a presentation will close the entire presentation. Any references to this object are invalid. Starting with an open presentation, it seems that this is my only option for repeatedly hiding and showing the PPT: a) Hide: Close the presentation, open with no window b) Show: Call ppt.NewWindow() c) goto a Is there any other way to repeatedly show and hide a given presentation? |
#2
|
|||
|
|||
Sorry, no can do. You can minimize the window, but you cannot close it w/o
closing the presentation. Your only way is to close and reopen at this point. Inbar. "Leo" wrote: I posted an earlier question about toggling the read-only state of a presentation, this post is similar. From within our application, I would like to be able to repeatedly toggle the visible state of a PowerPoint presentation. To open the presentation in a "hidden" state, I can make this call: pptPres = ppApp.Presentations.Open ("path to PPT", msoFalse, // allow changes msoFalse, // not untitled msoFalse); // without window To make the presentation visible, I can make this call: pptPres.NewWindow(); If I want to toggle it to hidden again, it seems that my only option is to close the window: pptPres.Windows.Item(1).Close(); At this point, I'm stuck - because closing the last window for a presentation will close the entire presentation. Any references to this object are invalid. Starting with an open presentation, it seems that this is my only option for repeatedly hiding and showing the PPT: a) Hide: Close the presentation, open with no window b) Show: Call ppt.NewWindow() c) goto a Is there any other way to repeatedly show and hide a given presentation? |
#3
|
|||
|
|||
I had basically come to the same conclusion myself. Unfortunately, I have
gotten spoiled on the Word object model and am finding the PowerPoint objects to be *considerably* less powerful. Do you know if there are any plans to bring the PowerPoint object model up to the level of Word? "Inbar" wrote: Sorry, no can do. You can minimize the window, but you cannot close it w/o closing the presentation. Your only way is to close and reopen at this point. Inbar. "Leo" wrote: I posted an earlier question about toggling the read-only state of a presentation, this post is similar. From within our application, I would like to be able to repeatedly toggle the visible state of a PowerPoint presentation. To open the presentation in a "hidden" state, I can make this call: pptPres = ppApp.Presentations.Open ("path to PPT", msoFalse, // allow changes msoFalse, // not untitled msoFalse); // without window To make the presentation visible, I can make this call: pptPres.NewWindow(); If I want to toggle it to hidden again, it seems that my only option is to close the window: pptPres.Windows.Item(1).Close(); At this point, I'm stuck - because closing the last window for a presentation will close the entire presentation. Any references to this object are invalid. Starting with an open presentation, it seems that this is my only option for repeatedly hiding and showing the PPT: a) Hide: Close the presentation, open with no window b) Show: Call ppt.NewWindow() c) goto a Is there any other way to repeatedly show and hide a given presentation? |
#4
|
|||
|
|||
You are absolutly right. The PPT object model is inferior to Word and Excel.
That is because there are many less people automating PPT then Word and Excel. With each realease, we are getting better, but Word and Excel will always have a better OM. That's life... "Leo" wrote: I had basically come to the same conclusion myself. Unfortunately, I have gotten spoiled on the Word object model and am finding the PowerPoint objects to be *considerably* less powerful. Do you know if there are any plans to bring the PowerPoint object model up to the level of Word? "Inbar" wrote: Sorry, no can do. You can minimize the window, but you cannot close it w/o closing the presentation. Your only way is to close and reopen at this point. Inbar. "Leo" wrote: I posted an earlier question about toggling the read-only state of a presentation, this post is similar. From within our application, I would like to be able to repeatedly toggle the visible state of a PowerPoint presentation. To open the presentation in a "hidden" state, I can make this call: pptPres = ppApp.Presentations.Open ("path to PPT", msoFalse, // allow changes msoFalse, // not untitled msoFalse); // without window To make the presentation visible, I can make this call: pptPres.NewWindow(); If I want to toggle it to hidden again, it seems that my only option is to close the window: pptPres.Windows.Item(1).Close(); At this point, I'm stuck - because closing the last window for a presentation will close the entire presentation. Any references to this object are invalid. Starting with an open presentation, it seems that this is my only option for repeatedly hiding and showing the PPT: a) Hide: Close the presentation, open with no window b) Show: Call ppt.NewWindow() c) goto a Is there any other way to repeatedly show and hide a given presentation? |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
hyper-links in Viewer | dclbaker | Powerpoint | 5 | December 9th, 2005 09:55 PM |
closing a presentation opened from a userform | barn2003@hotmail | Powerpoint | 3 | August 11th, 2004 02:44 PM |
PowerPoint Presentation will not load | Bowdrie | Powerpoint | 10 | July 6th, 2004 09:40 PM |
hyperlinks breaking a lot | shelleyc | Powerpoint | 20 | June 18th, 2004 02:17 AM |
Music file restarts when presentation loops | Patrick | Powerpoint | 2 | May 26th, 2004 03:19 AM |