Resize, Position & Crop an image in Mac PowerPoint with AppleScript

时间:2016-08-31 17:12:56

标签: applescript powerpoint

Since I've found mac powerpoint 2011 to have limited keyboard shortcuts for alignment and positioning I've come to rely on scripts to make my workflow more efficient. I've figured out how to resize and position images, but I'm having a hard time with cropping. Any AppleScript experts able to figure out what I'm doing wrong?

Here is my code (I've commented out stuff I've tried that doesn't work):

tell application "Microsoft PowerPoint"
    set theSelection to shape range of selection of active window

    -- reformat hero image
    set lock aspect ratio of theSelection to true
    set top of theSelection to (0.35 * 72)
    set left position of theSelection to (1.38 * 72)
    set width of theSelection to (7.67 * 72)

    -- broken stuff that I wished worked
    -- trying to set the scale of the image to 38%
    -- set the scale height of theSelection to (0.38)
    -- trying to crop the image to 4.88 inches from the top
    -- set crop bottom of picture format of theSelection to (4.88 * 72)
    -- set crop bottom of theSelection to (4.88 * 72)
    -- trying to send the image to the back
    -- set z order position of theSelection to 0
end tell

context: my company uses powerpoint to present website design comps to clients

0 个答案:

没有答案