【问题标题】:Is there an openTBS command to write/update the Notes section of a pptx slide?是否有一个 openTBS 命令来编写/更新 pptx 幻灯片的注释部分?
【发布时间】:2020-01-15 12:51:54
【问题描述】:

我正在使用 openTBS 更新幻灯片,还需要更新/替换备注部分中的模板内容。有没有支持的命令?

【问题讨论】:

    标签: powerpoint opentbs tinybutstrong


    【解决方案1】:

    没有用于执行此操作的本机命令,但有解决方法。

    在 PPTX 中,cmets 存储在子 XLM 文件中,例如 ppt/comments/comment2.xml。 每张幻灯片都可能有自己的评论子文件。

    找到哪个评论文件对应哪个幻灯片有点复杂。 但是你可以使用这样的代码在 PPTX 中找到所有的 Comment 文件:

    $all = $TBS->Plugin(OPENTBS_GET_FILES);
    $comments = array();
    foreach ($all as $file) {
        if (substr($file, 0, 13) == 'ppt/comments/') {
            $comments[] = $file;
        }
    }
    

    然后您可以打开每个子文件并将数据合并为 XML 文件。

    foreach ($comments as $file) {
        $TBS->PlugIn(OPENTBS_SELECT_FILE, $file);
        $TBS->MergeFields(...);
    }
    

    【讨论】:

    • 非常感谢您的回复!
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2022-09-30
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多