tell application "Microsoft PowerPoint" activate set this_presentation to make new presentation set picture_folder to ((choose folder with prompt "Choose a folder of images to convert:") as string) set the item_list to list folder picture_folder without invisibles repeat with i in item_list set picture_path to picture_folder & i set this_slide to make new slide at the end of the active presentation with properties {layout:slide layout large object} tell the active presentation -- copy the position and dimensions of the placeholder box tell shape 1 of this_slide copy {top, left position, width, height} to {shape_top, shape_left, shape_width, shape_height} copy {0, 0, 720, 540} to {shape_top, shape_left, shape_width, shape_height} delete end tell -- make a new picture box set picture_shape to make new picture at this_slide with properties {top:shape_top, left position:shape_left, lock aspect ratio:true, file name:picture_path} -- scale the picture to a smaller size scale height picture_shape factor 0.25 scale scale from top left with relative to original size scale width picture_shape factor 0.25 scale scale from top left with relative to original size -- get the dimensions of the picture tell picture_shape copy {width, height} to {picture_width, picture_height} end tell -- adjust the picture to fit if the picture_height is greater than the picture_width then set the height of the picture_shape to the shape_height else set the width of the picture_shape to the shape_width end if -- show the slide set the slide of the view of document window 1 to this_slide end tell end repeat end tell