Reputation: 11
In search of Automator or Applescript to batch convert Powerpoint Presentations with a single slide to an image file (preferably JPEG).
I am using Powerpoint 2011 for Mac and I am running OS X Yosemite. A
Upvotes: 0
Views: 1543
Reputation: 1
After weeks trying to, I find a way to batch convert an entire folder of pptx files into jpg (one slide each) with the same name as original each file. ITs windows using VBA. He goes, don't mind the non-code part I just changed the code and mix many that I find out there.
Sub BatchSave()
' Opens each PPT in the target folder and saves as PPT97-2003 format
Dim sFolder As String
Dim sPresentationName As String
Dim oPresentation As Presentation
Dim osld As Slide
' Get the foldername:
sFolder = InputBox("Folder containing PPT files to process", "Folder")
If sFolder = "" Then
Exit Sub
End If
' Make sure the folder name has a trailing backslash
If Right$(sFolder, 1) <> "\" Then
sFolder = sFolder & "\"
End If
' Are there PPT files there?
If Len(Dir$(sFolder & "*.PPTX")) = 0 Then
MsgBox "Bad folder name or no PPT files in folder."
Exit Sub
End If
' Open and save the presentations
sPresentationName = Dir$("*.PPTX")
While sPresentationName <> ""
Set osld = ActiveWindow.View.Slide
osld.Export sPresentationName & ".jpg", "jpg"
' New presentation is now saved as N_originalname.ppt
' Now let's rename them - comment out the next couple lines
' if you don't want to do this
' Original.PPT to Original.PPT.OLD
'Name sFolder & sPresentationName As sFolder & sPresentationName & ".OLD"
' N_Original.PPT to Original.PPT
'Name sFolder & "N_" & sPresentationName As sFolder & sPresentationName
sPresentationName = Dir$()
Wend
MsgBox "DONE"
End Sub
Upvotes: 0
Reputation: 207668
You could use unoconv
which is part of LibreOffice to convert to PDF and then ImageMagick to convert from PDF to JPG.
Both these tools can be installed on OSX using homebrew
, i.e.
brew install imagemagick
The command would then be
unoconv someFile.ppt someFile.pdf
convert -density 144 someFile.pdf someFile.jpg
I wouldn't use AppleScript to batch this, I would use find
from the bash
shell in Terminal like this
find . -iname "*.ppt" -exec unoconv "{}" "{}.pdf" \;
Upvotes: 1