Using Power Point with access

scjohn

Registered User.
Local time
Today, 09:35
Joined
Nov 3, 2004
Messages
31
Can some tell me if this is possible? I want to show a set of instructions that were made in Power Point and have it viewable in access, perfereably on a form. I have tried this but the presentation is unviewable except in design view, you can double click it and it will show.

Thanks
 
concept check: Access is Access. Power Point is Power Point. The idea of activating a .PPT from Access is the same as the idea of activating anything else that isn't .MDB from Access. You either launch the application via OLE or you launch the application via creating an Application Object and using automation to tickle the properties and methods of that object.

From your description, you probably have the OLE case. In which case, the double-click launch of an OLE application doesn't surprise me.
 
Powerpoint Code

I found this somewhere on the web...
I'm not sure where, but if someone knows, please post.

Code:
    Dim oPPTApp As Object
    Dim oPPTPres As Object
    Dim PresPath As String
    On Error Resume Next

    'Set path to powerpoint here
    PresPath = "C:\Training\Training Shows\" & Pname & ".pps"
    Set oPPTApp = CreateObject("PowerPoint.Application")
    If Not oPPTApp Is Nothing Then
        With oPPTApp
            Set oPPTPres = .Presentations.Open(PresPath, , , False)
            If Not oPPTPres Is Nothing Then
                oPPTPres.SlideShowSettings.Run
                Do While .SlideShowWindows.Count > 0
                    DoEvents
                Loop
            Else
                MsgBox "The code could not open the specified file." & _
                        "Check if the file is present at the location.", _
                        vbCritical + vbOKOnly, "PowerPoint Automation Example"
            End If
        End With
    Else
        MsgBox "The code failed to instantiate PowerPoint session.", _
                vbCritical + vbOKOnly, "PowerPoint Automation Example"
    End If
    Set oPPTPres = Nothing
    DoEvents
    oPPTApp.Quit
    DoEvents
    Set oPPTApp = Nothing
    'MsgBox "The PowerPoint session was terminated.", _
            vbInformation + vbOKOnly, "PowerPoint Automation Example"
 
nice. BTW, where can I get the complete programmer guide for Access?
 

Users who are viewing this thread

Back
Top Bottom