擴充 Google 簡報檔案
Google Apps Script 可讓您使用程式碼建立及修改 Google 簡報簡報,並使用 Google 簡報服務。您可以使用 Apps Script 在簡報中新增自訂選單、對話方塊和側欄。你也可以將 Google 簡報與其他 Google 服務整合,例如日曆、雲端硬碟和 Gmail。
開始使用
Apps Script 包含內建服務,可讓您透過程式碼建立、讀取及編輯 Google 簡報。Apps Script 可以透過兩種方式與 Google 簡報互動:
- 如果使用者具備該簡報的適當存取權,任何指令碼都能建立新的簡報或存取現有簡報。
- 指令碼可以繫結至簡報,讓指令碼更直接存取該指令碼的投影片使用者介面。如要建立繫結指令碼,請在 Google 簡報中依序選取「擴充功能」>「Apps Script」。
自訂選單和使用者介面
您可以新增自訂選單、對話方塊和側欄,自訂 Google 簡報。如要瞭解建立選單的基本概念,請參閱選單指南。如要瞭解如何自訂對話方塊的內容,請參閱 HTML 服務指南。
如果您打算將自訂介面發布為外掛程式的一部分,請遵循樣式指南,確保與 Google 簡報編輯器的樣式和版面配置一致。
Google 簡報外掛程式
外掛程式是特別封裝的 Apps Script 專案,可在 Google 簡報中執行,並可從 Google 簡報外掛程式商店安裝。如果您已為 Google 簡報開發指令碼,並想與全世界分享,可以透過 Apps Script 發布指令碼做為外掛程式,讓其他使用者從外掛程式商店安裝。
如需簡報外掛程式的範例,請參閱翻譯外掛程式範例或進度列外掛程式範例。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2024-12-21 (世界標準時間)。
[null,null,["上次更新時間:2024-12-21 (世界標準時間)。"],[[["Google Apps Script enables programmatic creation and modification of Google Slides presentations."],["Apps Script allows customization of Google Slides through custom menus, dialogs, and sidebars, and integration with other Google services."],["Scripts can be bound to a presentation for direct access to the Slides user interface or used independently with appropriate permissions."],["Apps Script projects can be packaged and published as add-ons, extending Google Slides functionality for other users."]]],[]]