Page Summary
-
Notes pages in a presentation contain content for handouts, including a shape for speaker notes.
-
Each slide in a presentation has a corresponding notes page.
-
Only the text within the speaker notes shape on a notes page can be modified.
-
Notes pages provide methods to retrieve various page elements like groups, images, lines, shapes, charts, tables, videos, and word art.
-
You can find a specific page element by its ID or retrieve placeholder elements by type and index on a notes page.
-
Text on a notes page can be replaced using the
replaceAllTextmethod, with an option for case-sensitive matching.
A notes page in a presentation.
These pages contain the content for presentation handouts, including a a shape that contains the slide's speaker notes. Each slide has one corresponding notes page. Only the text in the speaker notes shape can be modified.
Methods
| Method | Return type | Brief description |
|---|---|---|
Group[]
|
Returns the list of Group
objects on the page. |
|
Image[]
|
Returns the list of Image
objects on the page. |
|
Line[]
|
Returns the list of Line
objects on the page. |
|
String
|
Gets the unique ID for the page. | |
Page
|
Returns the Page
on the page with the given ID, or null
if none exists. |
|
Page
|
Returns the list of Page
objects rendered on the page. |
|
Page
|
Returns the placeholder Page
object for a specified Placeholder
or null
if a matching placeholder is not present. |
|
Page
|
Returns the placeholder Page
object for a specified Placeholder
and
a placeholder index, or null
if the placeholder is not present. |
|
Page
|
Returns the list of placeholder Page
objects in the page. |
|
Shape[]
|
Returns the list of Shape
objects on the page. |
|
Sheets
|
Returns the list of Sheets
objects on the page. |
|
Shape
|
Gets the shape containing the speaker notes on the page. | |
Table[]
|
Returns the list of Table
objects on the page. |
|
Video[]
|
Returns the list of Video
objects on the page. |
|
Word
|
Returns the list of Word
objects on the page. |
|
Integer
|
Replaces all instances of text matching find text with replace text. | |
Integer
|
Replaces all instances of text matching find text with replace text. |
Detailed documentation
getGroups()
getImages()
getLines()
getObjectId()
Gets the unique ID for the page. Object IDs used by pages and page elements share the same namespace.
Return
String
Authorization
Scripts that use this method require authorization with one or more of the following scopes :
-
https://www.googleapis.com/auth/presentations.currentonly -
https://www.googleapis.com/auth/presentations
getPageElementById(id)
Returns the PageElement
on the page with the given ID, or null
if none exists.
Parameters
| Name | Type | Description |
|---|---|---|
id
|
String
|
The ID of the page element that is being retrieved. |
Return
PageElement
|null
— The page element with the given ID.
Authorization
Scripts that use this method require authorization with one or more of the following scopes :
-
https://www.googleapis.com/auth/presentations.currentonly -
https://www.googleapis.com/auth/presentations
getPageElements()
Returns the list of PageElement
objects rendered on the page.
Return
Authorization
Scripts that use this method require authorization with one or more of the following scopes :
-
https://www.googleapis.com/auth/presentations.currentonly -
https://www.googleapis.com/auth/presentations
getPlaceholder(placeholderType)
Returns the placeholder PageElement
object for a specified PlaceholderType
or null
if a matching placeholder is not present.
If there are multiple placeholders with the same type, it returns the one with minimal placeholder index. If there are multiple matching placeholders with the same index, it returns the first placeholder from the page's page elements collection.
const slide = SlidesApp . getActivePresentation (). getSlides ()[ 0 ]; const placeholder = slide . getPlaceholder ( SlidesApp . PlaceholderType . CENTERED_TITLE , );
Parameters
| Name | Type | Description |
|---|---|---|
placeholder
|
Placeholder
|
The placeholder type to match. |
Return
PageElement
|null
— The placeholder page element, or null
if none is found.
Authorization
Scripts that use this method require authorization with one or more of the following scopes :
-
https://www.googleapis.com/auth/presentations.currentonly -
https://www.googleapis.com/auth/presentations
getPlaceholder(placeholderType, placeholderIndex)
Returns the placeholder PageElement
object for a specified PlaceholderType
and
a placeholder index, or null
if the placeholder is not present.
If there are multiple placeholders with the same type and index, it returns the first placeholder from the page's page elements collection.
const slide = SlidesApp . getActivePresentation (). getSlides ()[ 0 ]; const placeholder = slide . getPlaceholder ( SlidesApp . PlaceholderType . CENTERED_TITLE , 0 , );
Parameters
| Name | Type | Description |
|---|---|---|
placeholder
|
Placeholder
|
The placeholder type to match. |
placeholder
|
Integer
|
The placeholder index to match. |
Return
PageElement
|null
— The placeholder page element, or null
if none is found.
Authorization
Scripts that use this method require authorization with one or more of the following scopes :
-
https://www.googleapis.com/auth/presentations.currentonly -
https://www.googleapis.com/auth/presentations
getPlaceholders()
Returns the list of placeholder PageElement
objects in the page.
const master = SlidesApp . getActivePresentation (). getMasters ()[ 0 ]; Logger . log ( `Number of placeholders in the master: ${ master . getPlaceholders (). length } ` , );
Return
Authorization
Scripts that use this method require authorization with one or more of the following scopes :
-
https://www.googleapis.com/auth/presentations.currentonly -
https://www.googleapis.com/auth/presentations
getShapes()
getSheetsCharts()
Returns the list of SheetsChart
objects on the page.
Return
Authorization
Scripts that use this method require authorization with one or more of the following scopes :
-
https://www.googleapis.com/auth/presentations.currentonly -
https://www.googleapis.com/auth/presentations
getSpeakerNotesShape()
getTables()
getVideos()
getWordArts()
replaceAllText(findText, replaceText)
Replaces all instances of text matching find text with replace text. The search is case insensitive.
Parameters
| Name | Type | Description |
|---|---|---|
find
|
String
|
The text to find. |
replace
|
String
|
The text to replace the matched text. |
Return
Integer
— The number of occurrences changed.
Authorization
Scripts that use this method require authorization with one or more of the following scopes :
-
https://www.googleapis.com/auth/presentations.currentonly -
https://www.googleapis.com/auth/presentations
replaceAllText(findText, replaceText, matchCase)
Replaces all instances of text matching find text with replace text.
Parameters
| Name | Type | Description |
|---|---|---|
find
|
String
|
The text to find. |
replace
|
String
|
The text to replace the matched text. |
match
|
Boolean
|
If true
, the search is case sensitive; if false
, the search is
case insensitive. |
Return
Integer
— The number of occurrences changed.
Authorization
Scripts that use this method require authorization with one or more of the following scopes :
-
https://www.googleapis.com/auth/presentations.currentonly -
https://www.googleapis.com/auth/presentations

