Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.sys.mac.programmer.help > #7

Adding a picture to place holder on a PowerPoint slide

From Geico Caveman <spammers-go-here@spam.invalid>
Newsgroups alt.comp.lang.applescript, comp.sys.mac.programmer.help
Message-ID <2011031610571016807-spammersgohere@spaminvalid> (permalink)
Subject Adding a picture to place holder on a PowerPoint slide
Organization TeraNews.com
Date 2011-03-16 10:57 -0500

Cross-posted to 2 groups.

Show all headers | View raw


Hello,

I am trying to automate the creation of a presentation during an 
analysis run from Matlab. The idea is to generate some analysis numbers 
and a plot for each step, and add the details programmatically to a 
PowerPoint slide.

At the beginning of the run, the user opens a blank new presentation 
which captures all the output sent by osascript called by Matlab with 
command line arguments constructed by matlab (one title, two text items 
and one image file). Please do not worry about how Matlab does all 
that. I know how to do that part pretty well. The issue is an 
AppleScript issue purely.

I have selected a two column layout (text box and picture). When I run 
the script below without the picture, I get what I expect (a title and 
two items in the text box).

I cannot figure out how to set the content of the third placeholder 
with the image file the way I am creating the text box (see below).

--------

set thePicturePath to POSIX file (ImageFile)

tell application "Microsoft PowerPoint"
  tell active presentation
    set sObj to make new slide at end with properties {layout:slide 
layout text and object}
    set content of text range of text frame of place holder 1 of sObj 
to theTitle
    set content of text range of text frame of place holder 2 of sObj 
to listItem1 & return & listItem2
    ??
  end tell
end tell

----------

So, how do I add an image to place holder 3 in the "??" above ?

Thanks.

Back to comp.sys.mac.programmer.help | Previous | Next | Find similar


Thread

Adding a picture to place holder on a PowerPoint slide Geico Caveman <spammers-go-here@spam.invalid> - 2011-03-16 10:57 -0500

csiph-web