I'm trying to use Powershell to run through all the PowerPoints in a folder convert them to PDF. I did make one script that does this but the problem is I need them in saved in Notes format which only seems accessible if you are actually printing the document even if you're printing it to a PDF as opposed to saving it directly to a PDF.
The script below has been my most promising lead to modifying my program but the range keeps being in an unexpected range and I'm not sure why.
Add-type -AssemblyName Office
Add-type -AssemblyName Microsoft.Office.Interop.PowerPoint
$p = new-object -comobject powerpoint.application
$p.visible = 1
$document = $p.presentations.open('somefile.ppt')
$ranges = $document.PrintOptions.Ranges
$range = $ranges.Add(1,1)
$document.ExportAsFixedFormat($Path,
[Microsoft.Office.Interop.PowerPoint.PpFixedFormatType]::ppFixedFormatTypePDF,
[Microsoft.Office.Interop.PowerPoint.PpFixedFormatIntent]::ppFixedFormatIntentScreen,
[Microsoft.Office.Core.MsoTriState]::msoFalse,
[Microsoft.Office.Interop.PowerPoint.PpPrintHandoutOrder]::ppPrintHandoutVerticalFirst,
[Microsoft.Office.Interop.PowerPoint.PpPrintOutputType]::ppPrintOutputSlides,
[Microsoft.Office.Core.MsoTriState]::msoFalse,
$range,
[Microsoft.Office.Interop.PowerPoint.PpPrintRangeType]::ppPrintAll,
[System.Reflection.Missing]::Value,
$true,
$true,
$true,
$true,
$false,
[System.Reflection.Missing]::Value)