Last active
October 2, 2017 04:26
-
-
Save kde713/da7b17ce6747affc2eea10b8444b58fb to your computer and use it in GitHub Desktop.
[Apple Automator] Applescript to Convert Powerpoint to PDF (MS Powerpoint required)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(* | |
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