Automating af PP slide show from Excel

J

Jan Kronsell

Hi NG!

Im trying to get Excel to open and run a PPS file, and it works OK, but when
the show is over (last slide shown) it keeps PP application open.

I fI try to Quit the application like inthe code bnelow, it does so
immediately, that is without showing the slide show. The code looks like
this right now:

PS! The comment lines are in Danish so if you dont understand those its
understandable :)

Sub StartPres()
'Jan Kronsell 09-2003
'Vi erklærer en 0bjektvariabel
Dim PPapp As Object

'Og tildeler dem en værdi baseret på indholdet af arket

'Undersøger om PP er startet
On Error Resume Next
Set PPapp = GetObject(, "powerpoint.application")
If Err.Number <> 0 Then

'Ellers startes PP
Set PPapp = CreateObject("powerpoint.Application")
PPapp.Visible = True
End If

'Så åbnes præsentationen
PPapp.Presentations.Open Filename:="C:\Documents and Settings\Jan
Kronsell\Dokumenter\pres.pps", ReadOnly:=msoFalse

'Og afslutter
PPapp.ActivePresentation.Close
PPapp.Quit
Set PPapp = Nothing


End Sub

By the way, is there a way to minimize the application window on opening,
and maximizing it, whem the slide show is "up and running"? As it is now,
you clearly see PowerPoitn starting and the presentation opening. I woul
like to avoid that.

Jan
 

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