Article ID: 147628
Article Last Modified on 10/11/2006
Command button:
Name: runSlideShow
Caption: Start Slide Show
OnClick: =StartSlideShow()
'--------------------------------------------------------------------
' This function sets an object variable to a specific presentation
' (.ppt) using the GetObject() function, which makes the connection
' between Microsoft PowerPoint (the OLE Automation Server) and
' Microsoft Access (the OLE Automation Controller). Then, it uses the
' Run method of the presentation object to run a slide show using the
' specified .ppt file. The Run method has a SlideShowType argument,
' which accepts the following values:
'
' Value Purpose
' ----------------------------------------------
' 0 To display the slideshow full screen.
' 1 To display the slideshow in a window.
'
' Note that if your database has a reference to the PowerPoint 7.0
' Object Library, you can substitute enumeration types for these
' values: ppSlideShowFullScreen for 0 and ppSlideShowWindow for 1.
'--------------------------------------------------------------------
Function startSlideShow()
Dim pptObject As Object
Set pptObject = GetObject("c:\msoffice\powerpnt\pptexample.ppt")
pptObject.slideshow.Run (1)
End Function
Keywords: kbhowto kbinterop kbprogramming KB147628