-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
23 additions
and
23 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,26 @@ | ||
on run {input, parameters} | ||
set theOutput to {} | ||
tell application "Microsoft PowerPoint" -- work on version 15.15 or newer | ||
launch | ||
set theDial to start up dialog | ||
set start up dialog to false | ||
repeat with i in input | ||
open i | ||
set pdfPath to my makeNewPath(i) | ||
save active presentation in pdfPath as save as PDF -- save in same folder | ||
close active presentation saving no | ||
set end of theOutput to pdfPath as alias | ||
end repeat | ||
set start up dialog to theDial | ||
end tell | ||
return theOutput | ||
set theOutput to {} | ||
tell application "Microsoft PowerPoint" -- work on version 15.15 or newer | ||
launch | ||
set theDial to start up dialog | ||
set start up dialog to false | ||
repeat with i in input | ||
open i | ||
set pdfPath to my makeNewPath(i) | ||
save active presentation in pdfPath as save as PDF -- save in same folder | ||
close active presentation saving no | ||
set end of theOutput to pdfPath as alias | ||
end repeat | ||
set start up dialog to theDial | ||
end tell | ||
return theOutput | ||
end run | ||
|
||
on makeNewPath(f) | ||
set t to f as string | ||
if t ends with ".pptx" then | ||
return (text 1 thru -5 of t) & "pdf" | ||
else | ||
return t & ".pdf" | ||
end if | ||
end makeNewPath | ||
set t to f as string | ||
if t ends with ".pptx" then | ||
return (text 1 thru -5 of t) & "pdf" | ||
else | ||
return (text 1 thru -4 of t) & "pdf" | ||
end if | ||
end makeNewPath |
This file contains 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