Farzad Towhidi
Farzad Towhidi

Reputation: 383

Commandline switch/macro for Powerpoint 2010

Is there a switch or a general macro (that can be applied to any ppt file) to save a ppt file to png files?

Upvotes: 0

Views: 1458

Answers (1)

Todd Main
Todd Main

Reputation: 29153

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.

Upvotes: 2

Related Questions