簡報中的備忘稿母片。
備忘稿母片會定義所有備忘稿頁面的預設文字樣式和頁面元素。附註母片為唯讀。
方法
| 方法 | 傳回類型 | 簡短說明 |
|---|---|---|
get | Group[] | 傳回頁面上的 Group 物件清單。 |
get | Image[] | 傳回頁面上的 Image 物件清單。 |
get | Line[] | 傳回頁面上的 Line 物件清單。 |
get | String | 取得網頁的專屬 ID。 |
get | Page | 傳回具有指定 ID 的頁面上的 Page,如果沒有則傳回 null。 |
get | Page | 傳回頁面上顯示的 Page 物件清單。 |
get | Page | 傳回指定 Placeholder 的預留位置 Page 物件,或如果沒有相符的預留位置,則傳回 null。 |
get | Page | 傳回指定 Placeholder 和預留位置索引的預留位置 Page 物件,如果沒有預留位置,則傳回 null。 |
get | Page | 傳回頁面中的預留位置 Page 物件清單。 |
get | Shape[] | 傳回頁面上的 Shape 物件清單。 |
get | Sheets | 傳回頁面上的 Sheets 物件清單。 |
get | Table[] | 傳回頁面上的 Table 物件清單。 |
get | Video[] | 傳回頁面上的 Video 物件清單。 |
get | Word | 傳回頁面上的 Word 物件清單。 |
內容詳盡的說明文件
get Groups()
get Images()
get Lines()
get Object Id()
取得網頁的專屬 ID。網頁和網頁元素使用的物件 ID 共用相同的命名空間。
回攻員
String
授權
使用這個方法的指令碼需要一或多個下列範圍的授權:
-
https://www.googleapis.com/auth/presentations.currentonly -
https://www.googleapis.com/auth/presentations
get Page Element By Id(id)
傳回具有指定 ID 的頁面上的 Page,如果沒有則傳回 null。
參數
| 名稱 | 類型 | 說明 |
|---|---|---|
id | String | 要擷取的網頁元素 ID。 |
回攻員
Page:具有指定 ID 的頁面元素。
授權
使用這個方法的指令碼需要一或多個下列範圍的授權:
-
https://www.googleapis.com/auth/presentations.currentonly -
https://www.googleapis.com/auth/presentations
get Page Elements()
傳回頁面上顯示的 Page 物件清單。
回攻員
授權
使用這個方法的指令碼需要一或多個下列範圍的授權:
-
https://www.googleapis.com/auth/presentations.currentonly -
https://www.googleapis.com/auth/presentations
get Placeholder(placeholderType)
傳回指定 Placeholder 的預留位置 Page 物件,或如果沒有相符的預留位置,則傳回 null。
如果有多個相同類型的預留位置,系統會傳回預留位置索引最小的預留位置。如果有多個相符的預留位置具有相同索引,系統會從網頁的網頁元素集合傳回第一個預留位置。
const slide = SlidesApp.getActivePresentation().getSlides()[0]; const placeholder = slide.getPlaceholder( SlidesApp.PlaceholderType.CENTERED_TITLE, );
參數
| 名稱 | 類型 | 說明 |
|---|---|---|
placeholder | Placeholder |
回攻員
Page
授權
使用這個方法的指令碼需要一或多個下列範圍的授權:
-
https://www.googleapis.com/auth/presentations.currentonly -
https://www.googleapis.com/auth/presentations
get Placeholder(placeholderType, placeholderIndex)
傳回指定 Placeholder 和預留位置索引的預留位置 Page 物件,如果沒有預留位置,則傳回 null。
如果有多個相同類型和索引的預留位置,系統會從網頁的網頁元素集合傳回第一個預留位置。
const slide = SlidesApp.getActivePresentation().getSlides()[0]; const placeholder = slide.getPlaceholder( SlidesApp.PlaceholderType.CENTERED_TITLE, 0, );
參數
| 名稱 | 類型 | 說明 |
|---|---|---|
placeholder | Placeholder | |
placeholder | Integer |
回攻員
Page
授權
使用這個方法的指令碼需要一或多個下列範圍的授權:
-
https://www.googleapis.com/auth/presentations.currentonly -
https://www.googleapis.com/auth/presentations
get Placeholders()
傳回頁面中的預留位置 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 Shapes()
get Sheets Charts()
傳回頁面上的 Sheets 物件清單。
回攻員
授權
使用這個方法的指令碼需要一或多個下列範圍的授權:
-
https://www.googleapis.com/auth/presentations.currentonly -
https://www.googleapis.com/auth/presentations