PowerPoint Viewer 2003 and Visual Basic 6.0

P

Peanuts

Hi,
I'm building an application in VB6 and for one of the functions I need
to run the PowerPoint Viewer. The screen is than placed on the
secondary monitor, e.g. a videoprojector. So the audience only sees the
presentation.
When I use the (old!) PPT Viewer 97, I can give commands to go to the
next and previous slide, or even a certain slide.
I don't know how to accomplish that using the 2003 viewer version.
I use a part of some code I found on the Internet and adapted it:
....
sPPTFile = PPTfile 'PPTfile contains full path to the PPT file
Set oPPTViewer = CreateObject("PowerPointViewer.Application")

If Me.Check1.Value = vbChecked Then
Set oPPTShow = oPPTViewer.NewShow(sPPTFile, _
ppViewerSlideShowUseSlideTimings, True)
Else
Set oPPTShow = oPPTViewer.NewShow(sPPTFile, _
ppViewerSlideShowManualAdvance, True)
End If

'move screen to secondary screen
Call SetWindowText(FindWindow("screenClass", 0&), "")
Call SetWindowPos(FindWindow("screenClass", 0&), HWND_TOP, xPos, yPos,
wx, Hy, SWP_SHOWWINDOW)
......
To control the slides (e.g. the next slide):
Private Sub Command4_Click()
oPPTShow.Next
Me.Label2.Caption = "Dia: " & Str(oPPTShow.SlideNumber)
.....
etcetera

and to stop the presentation:
Private Sub Command2_Click()
On Error Resume Next

oPPTShow.Exit
Set oPPTShow = Nothing

oPPTViewer.Quit
Set oPPTViewer = Nothing
...... etcetera

Thise code uses the reference Microsoft PowerPointViewer 8.0 Object
Library, so the msppt8vr.olb.
But for the 2003 viewer there is no object library, so what can I do
now?
If anybody knows a solution, your help is appreciated.

Thanks in advance,
Jaap
 

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