Open PowerPoint from Access

Brian900

Registered User.
Local time
Today, 19:46
Joined
Oct 10, 2002
Messages
51
Does anyone know the vba to open a particular powerpoint presentation from access? My path would be "C:\TestDb.pps". I would also like to close access on the same click. I think it would be application.quit.

Thanks, Brian.:confused:
 
Brian,

This site has an example:

You will have to set the reference for Powerpoint.

I couldn't find much info on this ...

Wayne

p.s. yes --> application.quit
 
Wayne,

Where is the link?:confused:
 
Brian,

Its in the ether!

I'll go find it again and repost.

Wayne
 
Brian,

This time for sure ...


http://www.mvps.org/skp/ppt00025.htm

Code:
Sub PrintPPT()
    Dim AppPPT As Object
    Set AppPPT = CreateObject("PowerPoint.Application")
    AppPPT.Visible = True
    ' If you want to hide the PowerPoint Window, set the visible property
    ' to FALSE  and WithWindow argument of Open method to FALSE too.
    With AppPPT.Presentations.Open("c:\sample.ppt")
        DoEvents
    ' Use .PrintOptions property to specify any additional settings 
    ' Set background printing off else, PowerPoint will terminate
    ' before printing is completed.
        .PrintOptions.PrintInBackground = False
        .PrintOut  
        .PrintOptions.PrintInBackground = True
    End With
    AppPPT.Quit
    Set AppPPT = Nothing
End Sub

Wayne
 
Wayne,

Thanks for the reply. Here is what I ended up using.

varReturn = Shell("C:\Program Files\Microsoft
Office\Office\msaccess.exe ""C:\My
Documents\Test.mdb""", vbNormalFocus)

Thx, Brian:)
 

Users who are viewing this thread

Back
Top Bottom