Last active
March 7, 2019 21:39
-
-
Save RupGautam/732a6dc2452cb4c2a28b9c837440f29f to your computer and use it in GitHub Desktop.
Convert pptx to pdf Applescript
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
| 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