opening powerpoint file with applescript

B

brute100

I'm doing something dead simple but am having trouble.

With applescript, I'm doing:
tell application "Microsoft PowerPoint"
launch
open "disk:test.ppt"
end tell

I'm getting the error: "Can't make some data into the expected type"

The "test.ppt" file exists and is in the current PPT version.

I tried opening other Office files in this way (for ex Word) with no
problem. I'm stumped. Does anyone have any idea what is going on?
Thanks,
Joe
 
P

Paul Berkowitz

I'm doing something dead simple but am having trouble.

With applescript, I'm doing:
tell application "Microsoft PowerPoint"
launch
open "disk:test.ppt"
end tell

I'm getting the error: "Can't make some data into the expected type"

The "test.ppt" file exists and is in the current PPT version.

I tried opening other Office files in this way (for ex Word) with no
problem. I'm stumped. Does anyone have any idea what is going on?

You're trying to open a string (text). strings can't open. 'open' is in the
Standard Suite. You need to open a file - in AppleScript terms that means
'alias'. It actually says 'reference':

open: Open the specified object(s)
open reference -- list of objects to open

Normally that would be 'list of alias'. It will also work with a single
alias. so Try

tell application "Microsoft PowerPoint"
launch
open alias "disk:test.ppt"
end tell


--
Paul Berkowitz
MVP MacOffice
Entourage FAQ Page: <http://www.entourage.mvps.org/faq/index.html>
AppleScripts for Entourage: <http://macscripter.net/scriptbuilders/>

Please "Reply To Newsgroup" to reply to this message. Emails will be
ignored.

PLEASE always state which version of Microsoft Office you are using -
**2004**, X or 2001. It's often impossible to answer your questions
otherwise.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top