簡報中的備忘稿主控項。
筆記母片可為所有筆記頁面定義預設文字樣式和頁面元素。筆記主檔為唯讀。
方法
| 方法 | 傳回類型 | 簡短說明 | 
|---|---|---|
| get | Group[] | 傳回頁面上的 Group物件清單。 | 
| get | Image[] | 傳回頁面上的 Image物件清單。 | 
| get | Line[] | 傳回頁面上的 Line物件清單。 | 
| get | String | 取得網頁的專屬 ID。 | 
| get | Page | 傳回含有指定 ID 的頁面 Page,如果不存在則傳回null。 | 
| get | Page | 傳回在頁面上算繪的 Page物件清單。 | 
| get | Page | 針對指定的 Placeholder或null,傳回預留位置Page物件 (如果沒有相符的預留位置)。 | 
| get | Page | 針對指定的 Placeholder和預留位置索引,傳回預留位置Page物件,如果沒有預留位置,則傳回null。 | 
| get | Page | 傳回頁面中預留位置 Page物件的清單。 | 
| get | Shape[] | 傳回頁面上的 Shape物件清單。 | 
| get | Sheets | 傳回頁面上的 Sheets物件清單。 | 
| get | Table[] | 傳回頁面上的 Table物件清單。 | 
| get | Video[] | 傳回頁面上的 Video物件清單。 | 
| get | Word | 傳回頁面上的 Word物件清單。 | 
內容詳盡的說明文件
get
get
get
get
取得網頁的專屬 ID。網頁和網頁元素使用的物件 ID 會共用相同的命名空間。
回攻員
String
授權
使用這個方法的腳本需要具備下列一或多個範圍的授權:
- 
https://www.googleapis.com/auth/presentations.currentonly
- 
https://www.googleapis.com/auth/presentations
get
傳回含有指定 ID 的頁面 Page,如果不存在則傳回 null。
參數
| 名稱 | 類型 | 說明 | 
|---|---|---|
| id | String | 要擷取的網頁元素 ID。 | 
回攻員
Page:含有指定 ID 的頁面元素。
授權
使用這個方法的腳本需要具備下列一或多個範圍的授權:
- 
https://www.googleapis.com/auth/presentations.currentonly
- 
https://www.googleapis.com/auth/presentations
get
傳回在頁面上算繪的 Page 物件清單。
回攻員
授權
使用這個方法的腳本需要具備下列一或多個範圍的授權:
- 
https://www.googleapis.com/auth/presentations.currentonly
- 
https://www.googleapis.com/auth/presentations
get
如果沒有相符的預留位置,則會傳回指定 Placeholder 或 null 的預留位置 Page 物件。
如果有多個同類型預留位置,則會傳回索引值最小的預留位置。如果有多個符合的預留位置具有相同的索引,則會傳回網頁元素集合的首個預留位置。
const slide = SlidesApp.getActivePresentation().getSlides()[0]; const placeholder = slide.getPlaceholder( SlidesApp.PlaceholderType.CENTERED_TITLE, );
參數
| 名稱 | 類型 | 說明 | 
|---|---|---|
| placeholder | Placeholder | 
回攻員
授權
使用這個方法的腳本需要具備下列一或多個範圍的授權:
- 
https://www.googleapis.com/auth/presentations.currentonly
- 
https://www.googleapis.com/auth/presentations
get
針對指定的 Placeholder 和預留位置索引,傳回預留位置 Page 物件,如果沒有預留位置,則傳回 null。
如果有多個預留位置的類型和索引相同,則會傳回網頁元素集合的首個預留位置。
const slide = SlidesApp.getActivePresentation().getSlides()[0]; const placeholder = slide.getPlaceholder( SlidesApp.PlaceholderType.CENTERED_TITLE, 0, );
參數
| 名稱 | 類型 | 說明 | 
|---|---|---|
| placeholder | Placeholder | |
| placeholder | Integer | 
回攻員
授權
使用這個方法的腳本需要具備下列一或多個範圍的授權:
- 
https://www.googleapis.com/auth/presentations.currentonly
- 
https://www.googleapis.com/auth/presentations
get
傳回頁面中預留位置 Page 物件的清單。
const master = SlidesApp.getActivePresentation().getMasters()[0]; Logger.log( `Number of placeholders in the master: ${master.getPlaceholders().length}`, );
回攻員
授權
使用這個方法的腳本需要具備下列一或多個範圍的授權:
- 
https://www.googleapis.com/auth/presentations.currentonly
- 
https://www.googleapis.com/auth/presentations
get
get
傳回頁面上的 Sheets 物件清單。
回攻員
授權
使用這個方法的腳本需要具備下列一或多個範圍的授權:
- 
https://www.googleapis.com/auth/presentations.currentonly
- 
https://www.googleapis.com/auth/presentations