Class NotesMaster

NotesMaster

簡報的主講人。

Notes 的主投影片會定義所有記事頁面的預設文字樣式和頁面元素。記事管理員處於唯讀狀態。

方法

方法傳回類型簡短說明
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 物件清單。
getTables()Table[]傳回頁面上的 Table 物件清單。
getVideos()Video[]傳回頁面上的 Video 物件清單。
getWordArts()WordArt[]傳回頁面上的 WordArt 物件清單。

內容詳盡的說明文件

getGroups()

傳回頁面上的 Group 物件清單。

回攻員

Group[]

授權

使用這個方法的指令碼必須取得以下一或多個範圍的授權:

  • https://www.googleapis.com/auth/presentations.currentonly
  • https://www.googleapis.com/auth/presentations

getImages()

傳回頁面上的 Image 物件清單。

回攻員

Image[]

授權

使用這個方法的指令碼必須取得以下一或多個範圍的授權:

  • https://www.googleapis.com/auth/presentations.currentonly
  • https://www.googleapis.com/auth/presentations

getLines()

傳回頁面上的 Line 物件清單。

回攻員

Line[]

授權

使用這個方法的指令碼必須取得以下一或多個範圍的授權:

  • https://www.googleapis.com/auth/presentations.currentonly
  • https://www.googleapis.com/auth/presentations

getObjectId()

取得網頁的專屬 ID。頁面和頁面元素使用的物件 ID 會共用相同的命名空間。

回攻員

String

授權

使用這個方法的指令碼必須取得以下一或多個範圍的授權:

  • https://www.googleapis.com/auth/presentations.currentonly
  • https://www.googleapis.com/auth/presentations

getPageElementById(id)

傳回網頁上有指定 ID 的 PageElement,如果不存在,則傳回 null

參數

名稱類型說明
idString所擷取網頁元素的 ID。

回攻員

PageElement:具有指定 ID 的網頁元素。

授權

使用這個方法的指令碼必須取得以下一或多個範圍的授權:

  • https://www.googleapis.com/auth/presentations.currentonly
  • https://www.googleapis.com/auth/presentations

getPageElements()

傳回已在網頁上算繪的 PageElement 物件清單。

回攻員

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);

參數

名稱類型說明
placeholderTypePlaceholderType

回攻員

PageElement

授權

使用這個方法的指令碼必須取得以下一或多個範圍的授權:

  • 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);

參數

名稱類型說明
placeholderTypePlaceholderType
placeholderIndexInteger

回攻員

PageElement

授權

使用這個方法的指令碼必須取得以下一或多個範圍的授權:

  • 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);

回攻員

PageElement[]

授權

使用這個方法的指令碼必須取得以下一或多個範圍的授權:

  • https://www.googleapis.com/auth/presentations.currentonly
  • https://www.googleapis.com/auth/presentations

getShapes()

傳回頁面上的 Shape 物件清單。

回攻員

Shape[]

授權

使用這個方法的指令碼必須取得以下一或多個範圍的授權:

  • https://www.googleapis.com/auth/presentations.currentonly
  • https://www.googleapis.com/auth/presentations

getSheetsCharts()

傳回頁面上的 SheetsChart 物件清單。

回攻員

SheetsChart[]

授權

使用這個方法的指令碼必須取得以下一或多個範圍的授權:

  • https://www.googleapis.com/auth/presentations.currentonly
  • https://www.googleapis.com/auth/presentations

getTables()

傳回頁面上的 Table 物件清單。

回攻員

Table[]

授權

使用這個方法的指令碼必須取得以下一或多個範圍的授權:

  • https://www.googleapis.com/auth/presentations.currentonly
  • https://www.googleapis.com/auth/presentations

getVideos()

傳回頁面上的 Video 物件清單。

回攻員

Video[]

授權

使用這個方法的指令碼必須取得以下一或多個範圍的授權:

  • https://www.googleapis.com/auth/presentations.currentonly
  • https://www.googleapis.com/auth/presentations

getWordArts()

傳回頁面上的 WordArt 物件清單。

回攻員

WordArt[]

授權

使用這個方法的指令碼必須取得以下一或多個範圍的授權:

  • https://www.googleapis.com/auth/presentations.currentonly
  • https://www.googleapis.com/auth/presentations