M
Mike M.
I have a VB 6 program that automates PowerPoint to start/end a slide show.
I am trying to get the code to work with PPT 97 as well as 2000 and 2002.
The code works fine on 2000 and 2002 using msppt8.olb, msppt9.olb and
msppt.olb. However, when I run the program on a machine with PPT 97
installed I have two problems:
1. The PPT User Interface (frame window) shows.
2. The close of the pres and quit of the PPT application don't cause it to
go away. PowerPnt.exe is still listed in the task manager. The User
Interface went away though.
Here is the code snipped from my test program (some of you might recognize
parts of it <g>):
Dim ppt As PowerPoint.Application
Dim oPresA As PowerPoint.Presentation
' PowerPoint Constants
Const ppShowTypeSpeaker = 1
Const ppShowTypeInWindow = 1000
Set ppt = New PowerPoint.Application
If Not ppt Is Nothing Then
Set oPresA = ppt.Presentations.Open(App.Path & "\test.pps", , ,
msoFalse)
If Not oPresA Is Nothing Then
With oPresA
With .SlideShowSettings
.ShowType = ppShowTypeSpeaker
.Run
End With
' Try to size the slide show to fit in frame.
.SlideShowWindow.Height = Frame1.Height / 20
.SlideShowWindow.Width = Frame1.Width / 20
pptHandle = FindWindow("screenClass", vbNullString)
SetParent pptHandle, Frame1.hwnd
End With
End If
End If
In the form close I do this:
Frame1.Caption = "Please wait while shutting down show..."
If (Not oPresA Is Nothing) Then
oPresA.Close
Set oPresA = Nothing
End If
ppt.Quit
Set ppt = Nothing
I expected this to work the same as it does with PPT 2000. Am I wrong in
Assuming this?
TIA
"Judge not the lowly worm lest ye be judged accordingly"
I am trying to get the code to work with PPT 97 as well as 2000 and 2002.
The code works fine on 2000 and 2002 using msppt8.olb, msppt9.olb and
msppt.olb. However, when I run the program on a machine with PPT 97
installed I have two problems:
1. The PPT User Interface (frame window) shows.
2. The close of the pres and quit of the PPT application don't cause it to
go away. PowerPnt.exe is still listed in the task manager. The User
Interface went away though.
Here is the code snipped from my test program (some of you might recognize
parts of it <g>):
Dim ppt As PowerPoint.Application
Dim oPresA As PowerPoint.Presentation
' PowerPoint Constants
Const ppShowTypeSpeaker = 1
Const ppShowTypeInWindow = 1000
Set ppt = New PowerPoint.Application
If Not ppt Is Nothing Then
Set oPresA = ppt.Presentations.Open(App.Path & "\test.pps", , ,
msoFalse)
If Not oPresA Is Nothing Then
With oPresA
With .SlideShowSettings
.ShowType = ppShowTypeSpeaker
.Run
End With
' Try to size the slide show to fit in frame.
.SlideShowWindow.Height = Frame1.Height / 20
.SlideShowWindow.Width = Frame1.Width / 20
pptHandle = FindWindow("screenClass", vbNullString)
SetParent pptHandle, Frame1.hwnd
End With
End If
End If
In the form close I do this:
Frame1.Caption = "Please wait while shutting down show..."
If (Not oPresA Is Nothing) Then
oPresA.Close
Set oPresA = Nothing
End If
ppt.Quit
Set ppt = Nothing
I expected this to work the same as it does with PPT 2000. Am I wrong in
Assuming this?
TIA
"Judge not the lowly worm lest ye be judged accordingly"