问题
Is there a switch or a general macro (that can be applied to any ppt file) to save a ppt file to png files?
回答1:
No, there is no commandline switch for this. There are two possible options with switches though, one is /M
(macro), which means you can run a macro in your PPTX (and that macro could save to .PNG) or /PT
(print to) and print to OneNote (if you have it) and those images will be PNG. See Command-line switches for PowerPoint 2007 (which are the same as 2010) for more details.
A macro would look like this:
Sub PrintToPng()
Dim ap As Presentation: Set ap = ActivePresentation
ap.SaveAs ap.Path & "\" & "new", ppSaveAsPNG
End Sub
This will save each slide as it's own PNG in a subfolder named "new" at the same folder where the presentation was saved.
来源:https://stackoverflow.com/questions/5216050/commandline-switch-macro-for-powerpoint-2010