» Printing Powerpoint Presentations (VBA) by rdove |
|
(Login to remove green text ads)
This code allows you to print print a powerpoint presentation automatically.
Code:
'Code written by Ryan Wischmeyer
'This code is intended for educational use
'and may not be implemented into projects
'which are to be sold for retail value.
Option Explicit
Dim AppPPT As Object
'create instance of powerpoint
Set AppPPT = CreateObject("PowerPoint.Application")
'make powerpoint visible
AppPPT.Visible = True
'open the file
With AppPPT.Presentations.Open("c:\sample.ppt")
DoEvents
'make sure printing will not start yet
.PrintOptions.PrintInBackground = False
'Set the print what option
'1 - Slides
'2 - Handouts 2 per page
'3 - Handouts 3 per page
'4 - Handouts 6 per page
'5 - Notes Pages
'6 - Outline View
'7 - Slides
'8 - Handouts 4 per page
'9 - Handouts 9 per page
.PrintOptions.OutputType = 4
'start printing now
.PrintOut
.PrintOptions.PrintInBackground = True
'enable the slide frames
.PrintOptions.FrameSlides = True
End With
AppPPT.Quit
Set AppPPT = Nothing
|
|