Print out using "print to file" option with powerpoint 2008

To print slide 1 of a powerpoint presentation in a file, I use

tell application "Microsoft powerpoint"
print out active presentation from 1 to 1 print to file "myfile.ps" without showdialog
end tell

Unfortunately, the script results in printing in a file, which name is the name of the last file I printed to file manually (without applescript), but certainly not “myfile.ps”.

Is it a bug int the “print to file” option or am I doing something wrong ?

Thanks for your comments,

Michel

Hi mperez,

Have you tried to use an absolute file path instead of just a file name? I don’t know if that solves your problem, but maybe MS PowerPoint doesn’t know where exactly to save the file when you only pass a file name.


set filepath to ((path to desktop) as Unicode text) & "myfile.ps"

tell application "Microsoft powerpoint"
print out active presentation from 1 to 1 print to file filepath without showdialog
end tell

Hi Martin Michel

Many thanks for your reply.

Unfortunately, your idea does not work. What ever you enter in the file name, you get the file you entered dutring the last manual printing.

Michel