Vanished presentation after Slideshow

U

Udo Schneider

Hello,

I have a small problem with PowerPoint. I want to start a slideshow but
without the user either seeing that powerpoint is started or (if it is)
without seeing a presentation being opened.

That's why I use WithWindow:=false in the Open() call.

This works fine as long as I don't let a slideshow end. Once the
slideshow is finished the previously opened presentation is gone (it's
COM reference is invalid) and the Presentations Collection does not
include the presentation anymore.

The strange thing is that everything works (and the reference stays
intact) - unless you start a slideshow and /end/ it.

The attached vbs demonstrates this behaviour.

When run it will tell you that
* No ("0") presentation is loaded on start
* One ("1") presentation is loaded after "Load()"
* Click on the Message Box after the slideshow as end
* No ("0") presenation is loaded afterwards.

What I do not understand is why (/only after slideshow end/)
a) The Presenations collection does not contain the loaded Presentation
anymore and
b) why existing references to the presentation (and associated objects!)
are invalid

Any pointers?

Here's the VB-Script.



Set ppt = CreateObject("PowerPoint.Application")
Set presos = ppt.Presentations
MsgBox presos.Count & " Presos on Start"
Set preso = presos.Open("preso.ppt", true, true, false)
MsgBox presos.Count & " Presos after Open()"
Set window = preso.SlideShowSettings.run
MsgBox "Click when finished"
MsgBox presos.Count & " Presos after End of Slideshow"

Thanks for your help.

CU,

Udo
 

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

Top