powershell - PowerPoint to PDF: Minimum size option -
i attempting convert powerpoint files pdf using powershell , able so. however, trying take 1 step further , select 'minimum size (publishing online)' option through script.
is there property needs set happen? i'm guessing $ppqualitystandard
variable not sure.
edit: using currently:
function ppt_to_pdf ($folderpath, $pptname) { add-type -assemblyname office $ppformatpdf = 2 $ppqualitystandard = 0 $p = new-object -comobject powerpoint.application $p.visible = [microsoft.office.core.msotristate]::msotrue $ppt = $p.presentations.open("$folderpath\$pptname") $ppt.savecopyas("$folderpath\$pptname", 32) $ppt.close() $p.quit() $p = $null [gc]::collect() [gc]::waitforpendingfinalizers() }
i suspect need use .exportasfixedformat
rather .savecopyas
.
it takes, among other parameters, intent
type ppfixedformatintent
, can either:
ppfixedformatintentscreen
(=1)
or
ppfixedformatintentprint
(=2)
there's host of other parms. learn more, start ppt, go vba ide , press f2 object browser , search exportasfixedformat
Comments
Post a Comment