Skip to content

Instantly share code, notes, and snippets.

View Emrys365's full-sized avatar

Wangyou Zhang Emrys365

  • Shanghai Jiao Tong University
View GitHub Profile
@Emrys365
Emrys365 / remove_ppt_animation.applescript
Created March 26, 2021 17:57
Remove all animations in current PowerPoint presentation
on run {input, parameters}
tell application "Microsoft PowerPoint" -- version: 2019
set allSlides to slides of active presentation
repeat with each_slide in allSlides
set allShapes to shapes of each_slide
repeat with each_shape in allShapes
if animate of animation settings of each_shape is true then set animate of animation settings of each_shape to false
end repeat
end repeat
end tell
@Emrys365
Emrys365 / remove_ppt_notes.applescript
Created March 26, 2021 17:55
Remove all notes in current PowerPoint presentation
on run {input, parameters}
tell application "Microsoft PowerPoint" -- version: 2019
set allSlides to slides of active presentation
repeat with each_slide in allSlides
set content of text range of text frame of place holder 2 of notes page of each_slide to ""
end repeat
end tell
return input
end run
@Emrys365
Emrys365 / AppleScript_PPT_textbox2shape.scpt
Created October 12, 2019 13:21
Transform the selected TextBox into a Shape automatically by using the "intersect" operation.
set userLocale to user locale of (system info)
tell application "Microsoft PowerPoint" -- version: 2019
set theSelection to selection of active window
set theSelType to selection type of theSelection
if theSelType is selection type text then
# the text in a text box is selected
set theSelTextBox to shape 1 of shape range of theSelection
else if theSelType is selection type shapes then
# a shape is selected