Skip to content

Instantly share code, notes, and snippets.

@kde713
Last active October 2, 2017 04:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kde713/da7b17ce6747affc2eea10b8444b58fb to your computer and use it in GitHub Desktop.
Save kde713/da7b17ce6747affc2eea10b8444b58fb to your computer and use it in GitHub Desktop.
[Apple Automator] Applescript to Convert Powerpoint to PDF (MS Powerpoint required)
(*
Code from https://www.reddit.com/r/osx/comments/4gg3t3/batch_converting_powerpoint_2016_to_pdf_in/
*)
on run {input, parameters}
tell application "Finder"
set theItems to input
repeat with itemRef in theItems
set theItemParentPath to (container of itemRef) as text
set theItemName to (name of itemRef) as string
set theItemExtension to (name extension of itemRef)
set theItemExtensionLength to (count theItemExtension) + 1
set theOutputPath to theItemParentPath & (text 1 thru (-1 - theItemExtensionLength) of theItemName)
tell application "Microsoft PowerPoint"
open itemRef
tell active presentation
save in theOutputPath as save as PDF
close
end tell
end tell
end repeat
end tell
end run
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment