How to convert all the PPTs in a folder to PDF
- Download Visual Basic 6 project
This code sample is posted here for the general benefit of the PDF development community. Attribution and usage guidelines are as noted in the code source; please respect the wishes of the author when using this code.
Explicit' Author : Planet PDF
' E-mail : email@example.com
' Date : 10 March 1999
' URL : http://www.planetpdf.com/
' Version : 1.0
' Description: This is a simple demonstration of how all PPT
' files in a given folder can be converted to PDFs.
msPPT = CreateObject(
strSourcePath = 'c:tempPPTToProcess' strSourceFile = Dir(
strSourcePath + '*.PPT') strWatchInPath = 'c:MyWatchedFolderin'
Visible = True
' Iterate through each file in the folder
strSourceFile <> ''
' Your default printer needs to be have a postscript printer
' driver for this to work - you could set and reset the
' default printer if you preferred
' Open the PPT
strSourcePath + strSourceFile
' Format the destination filename
strDestinationFile = strWatchInPath + Left(
' Print the PPT to a PS file in the watched folder
' Grab the next file for processing
strSourceFile = Dir
msPPT = Nothing
' You'll need to close PPT by yourself and wait for
' the background printing to stop