根据当前演示文稿中选定的幻灯片创建新的Powerpoint演示文稿

时间:2016-01-18 07:46:01

标签: applescript powerpoint

我希望脚本使用当前演示文稿中当前选定的幻灯片,并使用这些幻灯片创建新演示文稿。这就是我正在尝试的,但无法正确复制幻灯片的语法(各种注释行)。

tell application "Microsoft PowerPoint"
    activate
    set thisPresentation to active presentation
    --copy object slide 5 of active presentation -- of thisPresentation
    --set selectedSlides to slide range of selection of active window
    --copy slide range of selection of active window

    set newPresentation to make new presentation
    paste object newPresentation

    close newPresentation saving yes
end tell

1 个答案:

答案 0 :(得分:1)

Blimey,是一个愚蠢的遗漏。该命令是“复制对象”,而不仅仅是“复制”。

tell application "Microsoft PowerPoint"
    activate
    copy object slide range of selection of active window

    set newPresentation to make new presentation
    paste object newPresentation
end tell

我知道它应该有效。