From: Maarkr on
Trying to print out this powerpoint pres. I referenced the Office and PPt
libraries but still get nothing...not even an error message.

Dim stPath As String
Dim ppApp As PowerPoint.Application
Dim ppPres As PowerPoint.Presentation
'
stPath =
"S:\Civil_Engineering_Squadron_(CES)\CES_Environmental_Mgt_(EM)\Shared_Environmental_
Mgt\DB\Training\CommanderSupervisorEnvironmentalCompliance-20090715.pptx"
'
'Open PowerPoint
Set ppApp = CreateObject("PowerPoint.Application")
ppApp.Visible = 1
'ppApp.WindowState = ppWindowMinimized 'must be visible but can hide
it by minimizing it--this commented cause it didn't work
'Open presenation file
Set ppPres = ppApp.Presentations.Open(stPath)
'Set to print notes pages
ppApp.ActivePresentation.PrintOptions.OutputType = 8
'Set number of copies
Printer.Copies = 1
'Send to Printer
ppPres.PrintOut
'Close Powerpoint
ppApp.Quit
Set ppApp = Nothing
Set ppres = Nothing

From: Daniel Pineault on
Take a look at the code found at
http://vb.codenewbie.com/articles/vb/1499/Printing_Powerpoint_Presentations_VBA-Page_1.html
--
Hope this helps,

Daniel Pineault
http://www.cardaconsultants.com/
For Access Tips and Examples: http://www.devhut.net
Please rate this post using the vote buttons if it was helpful.



"Maarkr" wrote:

> Trying to print out this powerpoint pres. I referenced the Office and PPt
> libraries but still get nothing...not even an error message.
>
> Dim stPath As String
> Dim ppApp As PowerPoint.Application
> Dim ppPres As PowerPoint.Presentation
> '
> stPath =
> "S:\Civil_Engineering_Squadron_(CES)\CES_Environmental_Mgt_(EM)\Shared_Environmental_
> Mgt\DB\Training\CommanderSupervisorEnvironmentalCompliance-20090715.pptx"
> '
> 'Open PowerPoint
> Set ppApp = CreateObject("PowerPoint.Application")
> ppApp.Visible = 1
> 'ppApp.WindowState = ppWindowMinimized 'must be visible but can hide
> it by minimizing it--this commented cause it didn't work
> 'Open presenation file
> Set ppPres = ppApp.Presentations.Open(stPath)
> 'Set to print notes pages
> ppApp.ActivePresentation.PrintOptions.OutputType = 8
> 'Set number of copies
> Printer.Copies = 1
> 'Send to Printer
> ppPres.PrintOut
> 'Close Powerpoint
> ppApp.Quit
> Set ppApp = Nothing
> Set ppres = Nothing
>