1
votes

I want to run PowerPoint slide show for only a particular slide. After my research, I tried following but I did not get expected result. Both of the scripts, starts slide show but from the first slide.

1)

`tell application "Microsoft PowerPoint"
    activate
    open "/Users/sanjeev/pppp.ppt"
    set slideShowSettings to slide show settings of active presentation
    set starting slide of slideShowSettings to 4
    set ending slide of slideShowSettings to 4
    run slide show slideShowSettings
end tell`

2)

`tell application "Microsoft PowerPoint"
    activate
    open "/Users/sanjeev/pppp.ppt"
    set slideShowSettings to slide show settings of active presentation
    run slide show slideShowSettings
    go to slide slide show view of slide show window 1 number 4
end tell`

The second script gives an error also: error "Microsoft PowerPoint got an error: slide show view of slide show window 1 doesn’t understand the go to slide message." number -1708 from slide show view of slide show window 1

I saw a question Want Applescript to change a Keynote presentation to a particular slide But I think that works only for KeyNote.

Can anyone help?

Thanks

1

1 Answers

4
votes

This seems to work. It looks buggy to me. When the script is run the screen goes black, then flashes the slide then goes black then finally displays the slide. I don't know if this is due to the script or the implementation of Applescript/ppt from Microsoft. I say the latter.

tell application "Microsoft PowerPoint"
    set temp to active presentation's slide show settings
    set temp's starting slide to 2
    set temp's ending slide to 2
    set temp's range type to slide show range
    set temp's advance mode to slide show advance manual advance
    run slide show temp
end tell