Class NotesPage Stay organized with collections Save and categorize content based on your preferences.
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 containsthe slide's speaker notes. Each slide has one corresponding notes page. Only the text in thespeaker notes shape can be modified.
Methods
| Method | Return type | Brief description |
|---|---|---|
get | Group[] | Returns the list ofGroup objects on the page. |
get | Image[] | Returns the list ofImage objects on the page. |
get | Line[] | Returns the list ofLine objects on the page. |
get | String | Gets the unique ID for the page. |
get | Page | Returns thePage on the page with the given ID, ornull if none exists. |
get | Page | Returns the list ofPage objects rendered on the page. |
get | Page | Returns the placeholderPage object for a specifiedPlaceholder ornull if a matching placeholder is not present. |
get | Page | Returns the placeholderPage object for a specifiedPlaceholder anda placeholder index, ornull if the placeholder is not present. |
get | Page | Returns the list of placeholderPage objects in the page. |
get | Shape[] | Returns the list ofShape objects on the page. |
get | Sheets | Returns the list ofSheets objects on the page. |
get | Shape | Gets the shape containing the speaker notes on the page. |
get | Table[] | Returns the list ofTable objects on the page. |
get | Video[] | Returns the list ofVideo objects on the page. |
get | Word | Returns the list ofWord objects on the page. |
replace | Integer | Replaces all instances of text matching find text with replace text. |
replace | 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 samenamespace.
Return
String
Authorization
Scripts that use this method require authorization with one or more of the followingscopes:
https://www.googleapis.com/auth/presentations.currentonlyhttps://www.googleapis.com/auth/presentations
getPageElementById(id)
Returns thePage on the page with the given ID, ornull if none exists.
Parameters
| Name | Type | Description |
|---|---|---|
id | String | The ID of the page element that is being retrieved. |
Return
Page — The page element with the given ID.
Authorization
Scripts that use this method require authorization with one or more of the followingscopes:
https://www.googleapis.com/auth/presentations.currentonlyhttps://www.googleapis.com/auth/presentations
getPageElements()
Returns the list ofPage objects rendered on the page.
Return
Authorization
Scripts that use this method require authorization with one or more of the followingscopes:
https://www.googleapis.com/auth/presentations.currentonlyhttps://www.googleapis.com/auth/presentations
getPlaceholder(placeholderType)
Returns the placeholderPage object for a specifiedPlaceholder ornull if a matching placeholder is not present.
If there are multiple placeholders with the same type, it returns the one with minimalplaceholder index. If there are multiple matching placeholders with the same index, it returnsthe first placeholder from the page's page elements collection.
constslide=SlidesApp.getActivePresentation().getSlides()[0];constplaceholder=slide.getPlaceholder(SlidesApp.PlaceholderType.CENTERED_TITLE,);
Parameters
| Name | Type | Description |
|---|---|---|
placeholder | Placeholder |
Return
Page
Authorization
Scripts that use this method require authorization with one or more of the followingscopes:
https://www.googleapis.com/auth/presentations.currentonlyhttps://www.googleapis.com/auth/presentations
getPlaceholder(placeholderType, placeholderIndex)
Returns the placeholderPage object for a specifiedPlaceholder anda placeholder index, ornull if the placeholder is not present.
If there are multiple placeholders with the same type and index, it returns the firstplaceholder from the page's page elements collection.
constslide=SlidesApp.getActivePresentation().getSlides()[0];constplaceholder=slide.getPlaceholder(SlidesApp.PlaceholderType.CENTERED_TITLE,0,);
Parameters
| Name | Type | Description |
|---|---|---|
placeholder | Placeholder | |
placeholder | Integer |
Return
Page
Authorization
Scripts that use this method require authorization with one or more of the followingscopes:
https://www.googleapis.com/auth/presentations.currentonlyhttps://www.googleapis.com/auth/presentations
getPlaceholders()
Returns the list of placeholderPage objects in the page.
constmaster=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 followingscopes:
https://www.googleapis.com/auth/presentations.currentonlyhttps://www.googleapis.com/auth/presentations
getShapes()
getSheetsCharts()
Returns the list ofSheets objects on the page.
Return
Authorization
Scripts that use this method require authorization with one or more of the followingscopes:
https://www.googleapis.com/auth/presentations.currentonlyhttps://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 caseinsensitive.
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 followingscopes:
https://www.googleapis.com/auth/presentations.currentonlyhttps://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 | Iftrue, the search is case sensitive; iffalse, 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 followingscopes:
https://www.googleapis.com/auth/presentations.currentonlyhttps://www.googleapis.com/auth/presentations
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-12-11 UTC.