使用插件扩展 Google 幻灯片的功能
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
Google 幻灯片是一款基于云的演示解决方案,具有实时协作功能和强大的工具,可让您快速构建自定义演示文稿。
您可以使用插件扩展 Google 幻灯片的功能,帮助用户制作新演示文稿、建立与第三方系统的连接,以及将幻灯片数据与其他 Google Workspace 应用(例如 Google 表格)集成。
您可以在 Google Workspace Marketplace 中查看其他人构建的 Google 幻灯片插件。
可以采取的措施
借助可扩展 Google 幻灯片的插件,您可以执行以下操作:
Google 幻灯片插件是使用 Apps 脚本构建的。如需详细了解如何使用 Apps 脚本访问和管理 Google 幻灯片,请参阅扩展 Google 幻灯片。
演示文稿结构
Google 幻灯片演示文稿由若干页面组成,每个页面都包含一些元素,例如文本框和图片。
Apps 脚本 Slides 服务提供了多个类来表示 Google 幻灯片中的组织结构(例如 Slide
和 Shape
)。您可以使用这些类来读取和修改 Google 幻灯片数据和行为。
如需详细了解 Google 幻灯片演示的结构,请参阅演示的结构。
触发器
借助 Apps 脚本触发器,脚本项目可以在满足特定条件时(例如打开演示文稿或安装插件时)执行指定函数。
如需详细了解哪些触发器可用于 Google 幻灯片插件以及使用这些触发器时有哪些限制,请参阅插件触发器。
深入阅读
在开发 Google 幻灯片插件时,以下 Apps 脚本指南可能会有所帮助:
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-31。
[null,null,["最后更新时间 (UTC):2025-07-31。"],[[["\u003cp\u003eGoogle Slides is a cloud-based presentation tool with real-time collaboration and robust features for creating custom presentations.\u003c/p\u003e\n"],["\u003cp\u003eSlides add-ons enhance Google Slides by allowing users to build presentations, connect to external systems, and integrate with other Google Workspace apps.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can utilize Apps Script and the Slides service to programmatically read, edit, format, and visualize Google Slides presentations.\u003c/p\u003e\n"],["\u003cp\u003eApps Script triggers can automate tasks within Google Slides by executing specific functions when predefined events occur, like opening a presentation.\u003c/p\u003e\n"],["\u003cp\u003eGoogle provides comprehensive documentation and guides to support developers in building and extending Google Slides functionality with add-ons.\u003c/p\u003e\n"]]],["Google Slides add-ons, built with Apps Script, extend Slides' functionality. Key actions include reading, editing, visualizing, and formatting slides using Apps Script's Slides service or the Google Slides API. Developers can create custom menus, dialogs, and sidebars with HTML and CSS, and set up triggers for specific events. Add-ons interact with presentation elements like slides and shapes, modifying data and behavior, with the option to install from the Google Workspace Marketplace.\n"],null,["# Extending Google Slides with add-ons\n\n[Google Slides](https://workspace.google.com/products/slides/) is a cloud-based\npresentation solution with real-time collaboration and powerful\ntools that let you quickly build custom slide decks.\n\nYou can extend Google Slides with add-ons that help users construct\nnew presentations, establish connectivity to third-party systems, and integrate\nyour Slides data with other Google Workspace\napplications (like Google Sheets).\n\nYou can see the Slides add-ons others have built on the\n[Google Workspace Marketplace](https://workspace.google.com/marketplace/category/works-with-slides).\n\nWhat you can do\n---------------\n\nHere are a few things you can do with an add-on that extends Google Slides:\n\n- You can read, edit, visualize, and format slides in Google Slides presentations using the built-in Apps Script [Slides service](/apps-script/reference/slides).\n- You can use the Apps Script [advanced Slides service](/apps-script/advanced/slides) to access the [Google Slides API](/workspace/slides/how-tos/overview) directly.\n- You can create [custom menus](/workspace/add-ons/concepts/menus) and define multiple [custom dialogs and sidebars](/workspace/add-ons/concepts/dialogs) interfaces using standard HTML and CSS.\n- You can create add-ons [triggers](#triggers) that run specified functions when certain triggering events occur.\n\nSlides add-ons are built using Apps Script. To learn more about how to access\nand manage Google Slides with Apps Script, see\n[Extending Google Slides](/apps-script/guides/slides).\n\nPresentation structure\n----------------------\n\nA Google Slides presentation consists of pages, each of which as some number\nof elements such as text boxes and images.\n\nThe Apps Script [Slides service](/apps-script/reference/slides)\nprovides several classes to represent organizational structures in Slides\n(such as [`Slide`](/apps-script/reference/slides/slide) and\n[`Shape`](/apps-script/reference/slides/shape)). You can use these classes to\nread and modify Slides data and behavior.\n\nTo learn more about how Slides presentations are organized, see\n[Structure of a presentation](/apps-script/guides/slides/presentations).\n\nTriggers\n--------\n\nApps Script [triggers](/workspace/add-ons/concepts/editor-triggers) let a script project\nexecute a specified function when certain conditions are met, such as when\na presentation is opened or when an add-on is installed.\n\nSee [add-on triggers](/workspace/add-ons/concepts/editor-triggers) for more information\non what triggers can be used with Slides add-ons and what restrictions apply\nto their use.\n\nFurther reading\n---------------\n\nThe following Apps Script guides may be helpful when developing Slides add-ons:\n\n- [Extending Google Slides](/apps-script/guides/slides)\n- [Structure of a presentation](/apps-script/guides/slides/presentations)\n- [Sizing and positioning page elements](/apps-script/guides/slides/moving-elements)\n- [Selecting items in a presentation](/apps-script/guides/slides/selecting)\n- [Editing and styling text](/apps-script/guides/slides/editing-styling)\n- [Lifecycle of an update](/apps-script/guides/slides/lifecycle)"]]