簡報中的備忘稿頁面。
這些網頁包含簡報講義的內容,包括一個包含投影片演講者備忘稿的形狀。每張投影片都有相應的筆記頁面。只能修改講者附註形狀中的文字。
方法
方法 | 傳回類型 | 簡短說明 |
---|---|---|
getGroups() | Group[] | 傳回頁面上的 Group 物件清單。 |
getImages() | Image[] | 傳回頁面上的 Image 物件清單。 |
getLines() | Line[] | 傳回頁面上的 Line 物件清單。 |
getObjectId() | String | 取得網頁的專屬 ID。 |
getPageElementById(id) | PageElement | 傳回網頁上有指定 ID 的 PageElement ,如果不存在,則傳回 null 。 |
getPageElements() | PageElement[] | 傳回已在網頁上算繪的 PageElement 物件清單。 |
getPlaceholder(placeholderType) | PageElement | 傳回指定 PlaceholderType 的預留位置 PageElement 物件;如果沒有相符的預留位置,則傳回 null 。 |
getPlaceholder(placeholderType, placeholderIndex) | PageElement | 傳回指定 PlaceholderType 和預留位置索引的預留位置 PageElement 物件;如果沒有預留位置,則傳回 null 。 |
getPlaceholders() | PageElement[] | 傳回頁面中的預留位置 PageElement 物件清單。 |
getShapes() | Shape[] | 傳回頁面上的 Shape 物件清單。 |
getSheetsCharts() | SheetsChart[] | 傳回頁面上的 SheetsChart 物件清單。 |
getSpeakerNotesShape() | Shape | 取得頁面上的演講者備忘稿形狀。 |
getTables() | Table[] | 傳回頁面上的 Table 物件清單。 |
getVideos() | Video[] | 傳回頁面上的 Video 物件清單。 |
getWordArts() | WordArt[] | 傳回頁面上的 WordArt 物件清單。 |
replaceAllText(findText, replaceText) | Integer | 以取代文字取代所有符合搜尋文字的項目。 |
replaceAllText(findText, replaceText, matchCase) | Integer | 以取代文字取代所有符合搜尋文字的項目。 |
內容詳盡的說明文件
getGroups()
getImages()
getLines()
getObjectId()
取得網頁的專屬 ID。頁面和頁面元素使用的物件 ID 會共用相同的命名空間。
回攻員
String
授權
使用這個方法的指令碼必須取得以下一或多個範圍的授權:
-
https://www.googleapis.com/auth/presentations.currentonly
-
https://www.googleapis.com/auth/presentations
getPageElementById(id)
傳回網頁上有指定 ID 的 PageElement
,如果不存在,則傳回 null
。
參數
名稱 | 類型 | 說明 |
---|---|---|
id | String | 所擷取網頁元素的 ID。 |
回攻員
PageElement
:具有指定 ID 的網頁元素。
授權
使用這個方法的指令碼必須取得以下一或多個範圍的授權:
-
https://www.googleapis.com/auth/presentations.currentonly
-
https://www.googleapis.com/auth/presentations
getPageElements()
傳回已在網頁上算繪的 PageElement
物件清單。
回攻員
授權
使用這個方法的指令碼必須取得以下一或多個範圍的授權:
-
https://www.googleapis.com/auth/presentations.currentonly
-
https://www.googleapis.com/auth/presentations
getPlaceholder(placeholderType)
傳回指定 PlaceholderType
的預留位置 PageElement
物件;如果沒有相符的預留位置,則傳回 null
。
如果有多個相同類型的預留位置,則會傳回具有最低預留位置索引數量的預留位置。如果多個相符預留位置都具備相同索引,則會傳回網頁元素集合中的第一個預留位置。
var slide = SlidesApp.getActivePresentation().getSlides()[0]; var placeholder = slide.getPlaceholder(SlidesApp.PlaceholderType.CENTERED_TITLE);
參數
名稱 | 類型 | 說明 |
---|---|---|
placeholderType | PlaceholderType |
回攻員
授權
使用這個方法的指令碼必須取得以下一或多個範圍的授權:
-
https://www.googleapis.com/auth/presentations.currentonly
-
https://www.googleapis.com/auth/presentations
getPlaceholder(placeholderType, placeholderIndex)
傳回指定 PlaceholderType
和預留位置索引的預留位置 PageElement
物件;如果沒有預留位置,則傳回 null
。
如果多個預留位置具有相同的類型和索引,則會傳回網頁元素集合中的第一個預留位置。
var slide = SlidesApp.getActivePresentation().getSlides()[0]; var placeholder = slide.getPlaceholder(SlidesApp.PlaceholderType.CENTERED_TITLE, 0);
參數
名稱 | 類型 | 說明 |
---|---|---|
placeholderType | PlaceholderType | |
placeholderIndex | Integer |
回攻員
授權
使用這個方法的指令碼必須取得以下一或多個範圍的授權:
-
https://www.googleapis.com/auth/presentations.currentonly
-
https://www.googleapis.com/auth/presentations
getPlaceholders()
傳回頁面中的預留位置 PageElement
物件清單。
var 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
getShapes()
getSheetsCharts()
傳回頁面上的 SheetsChart
物件清單。
回攻員
授權
使用這個方法的指令碼必須取得以下一或多個範圍的授權:
-
https://www.googleapis.com/auth/presentations.currentonly
-
https://www.googleapis.com/auth/presentations
getSpeakerNotesShape()
getTables()
getVideos()
getWordArts()
replaceAllText(findText, replaceText)
以取代文字取代所有符合搜尋文字的項目。搜尋不區分大小寫。
參數
名稱 | 類型 | 說明 |
---|---|---|
findText | String | 要尋找的文字。 |
replaceText | String | 要取代相符文字的文字。 |
回攻員
Integer
:變更的重複次數
授權
使用這個方法的指令碼必須取得以下一或多個範圍的授權:
-
https://www.googleapis.com/auth/presentations.currentonly
-
https://www.googleapis.com/auth/presentations
replaceAllText(findText, replaceText, matchCase)
以取代文字取代所有符合搜尋文字的項目。
參數
名稱 | 類型 | 說明 |
---|---|---|
findText | String | 要尋找的文字。 |
replaceText | String | 要取代相符文字的文字。 |
matchCase | Boolean | 如果值為 true ,則搜尋會區分大小寫;如果值為 false ,則搜尋不區分大小寫。 |
回攻員
Integer
:變更的重複次數
授權
使用這個方法的指令碼必須取得以下一或多個範圍的授權:
-
https://www.googleapis.com/auth/presentations.currentonly
-
https://www.googleapis.com/auth/presentations