2011-12-08 60 views
1

我想僅爲特定幻燈片運行PowerPoint幻燈片放映。 經過我的研究,我嘗試了以下,但沒有得到預期的結果。 這兩個腳本都從第一張幻燈片開始幻燈片播放。使用Applescript在演示文稿中運行指定幻燈片的幻燈片放映

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` 

第二個腳本提供了一個錯誤也: 錯誤「Microsoft PowerPoint中得到了一個錯誤:幻燈片窗口的幻燈片視圖不瞭解轉到幻燈片消息。「編號-1708幻燈片顯示幻燈片放映視圖1

我看到一個問題Want Applescript to change a Keynote presentation to a particular slide 但我認爲這隻適用於KeyNote。

任何人都可以幫忙嗎?

感謝

回答

4

這似乎是工作。它看起來很怪我。腳本運行時,屏幕變黑,然後閃爍幻燈片然後變黑,最後顯示幻燈片。我不知道這是由於腳本還是來自Microsoft的Applescript/ppt的實現。我說後者。

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 
+0

非常感謝!它運作良好。任何想法,如果我們可以在運行幻燈片時關閉在後臺打開的演示文稿。 – san

+0

演示文稿的窗口需要打開以供演示文稿運行。 –