A collection of use(less|ful) scripts
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

21 lines
743 B

Option Explicit
Const ppWindowMinimized = 2
Const ppSaveAsPDF = 32
Const msoTrue = -1
Dim FsObj : Set FsObj = CreateObject("Scripting.FileSystemObject")
Dim inputFile : inputFile = WScript.Arguments.Item(0)
inputFile = FsObj.GetAbsolutePathName(inputFile)
Dim outputFile : outputFile = FsObj.BuildPath(FsObj.GetParentFolderName(inputFile), FsObj.GetBaseName(inputFile) & ".pdf")
Dim PowerPointApp : Set PowerPointApp = CreateObject("PowerPoint.Application")
PowerPointApp.Visible = vbTrue
PowerPointApp.WindowState = ppWindowMinimized
Dim PowerPointPres : Set PowerPointPres = PowerPointApp.Presentations.Open(inputFile)
PowerPointPres.SaveAs outputFile, ppSaveAsPDF, msoTrue
PowerPointPres.Close
PowerPointApp.Quit