Creating PPTs from folder of images (bonus: add titles from excel)

Goal - have applescript create a PPT show from a folder of images, then suck a list of titles from excel (there’d be a one to one correlation with the images). Then there’d be a title slide added, a template applied, and some specific animations and transitions added. But first things first - - I should probably get this script to run before any of that!

Any pointers to where I’m going wrong?

 
set this_folder to (choose folder with prompt "Pick the folder containing
the images to process:") as string
set these_files to path of every file of folder this_folder
end tell
tell application "Microsoft PowerPoint"
activate
set this_presentation to make new presentation
repeat with i from 1 to the count of these_files
set this_file to (item i of these_files)
set this_slide to make new slide at the end of this_presentation with properties {layout:slide layout large object}
-- copy placeholder
tell shape 1 of this_slide
copy {top, left position, width, height} to {shape_top,shape_left, shape_width, shape_height}
delete
end tell
-- 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:this_file}
-- scale the picture
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
-- 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
end tell

Thanks!

Model: iMac G5
Browser: Safari 312.6
Operating System: Mac OS X (10.3.9)