如何通过苹果脚本访问 ppt 文件中的笔记文本



我想在os x上的PPT文件中获取笔记文本。我觉得这应该有效:

get content of notes page of slide N of active presentation

但它总是返回"缺失值"。有什么想法吗?

顺便说一下,我的目标是能够创建一组幻灯片的新版本,其中笔记不包含文本 学生=隐藏...我喜欢为学生提供幻灯片,但并不总是希望他们提前看到所有内容(例如课堂练习的正确结果)。

注释在形状中(place holder类 --> text frame --> text range -->内容)。

下面是如何在每张幻灯片中获取注释值的示例:

tell application "Microsoft PowerPoint"
    repeat with tSlide in (get slides of active presentation)
        set tNote to ""
        repeat with t_shape in (get shapes of notes page of tSlide)
            tell t_shape to if has text frame then tell its text frame to if has text then
                set tNote to content of its text range -- get the note of this slide
                exit repeat
            end if
        end repeat
        if tNote does not contain "STUDENT=HIDE" then
            --- *** do something with tSlide *** ---
            --
            --
        end if
    end repeat
end tell

最新更新