Class NotesMaster | Apps Script | Google for Developers (original) (raw)
Class NotesMaster
Stay organized with collections Save and categorize content based on your preferences.
NotesMaster
A notes master in a presentation.
Notes masters define the default text styles and page elements for all notes pages. Notes masters are read-only.
Detailed documentation
getGroups()
Returns the list of [Group](/apps-script/reference/slides/group)
objects on the page.
Return
[Group[]](/apps-script/reference/slides/group)
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
getImages()
Returns the list of [Image](/apps-script/reference/slides/image)
objects on the page.
Return
[Image[]](/apps-script/reference/slides/image)
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
getLines()
Returns the list of [Line](/apps-script/reference/slides/line)
objects on the page.
Return
[Line[]](/apps-script/reference/slides/line)
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
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](/apps-script/reference/slides/page-element)
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](/apps-script/reference/slides/page-element)
— 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](/apps-script/reference/slides/page-element)
objects rendered on the page.
Return
[PageElement[]](/apps-script/reference/slides/page-element)
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](/apps-script/reference/slides/page-element)
object for a specified [PlaceholderType](/apps-script/reference/slides/placeholder-type)
ornull
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 |
---|---|---|
placeholderType | PlaceholderType |
Return
[PageElement](/apps-script/reference/slides/page-element)
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](/apps-script/reference/slides/page-element)
object for a specified [PlaceholderType](/apps-script/reference/slides/placeholder-type)
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 |
---|---|---|
placeholderType | PlaceholderType | |
placeholderIndex | Integer |
Return
[PageElement](/apps-script/reference/slides/page-element)
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](/apps-script/reference/slides/page-element)
objects in the page.
const master = SlidesApp.getActivePresentation().getMasters()[0];
Logger.log(
Number of placeholders in the master: ${master.getPlaceholders().length}
,
);
Return
[PageElement[]](/apps-script/reference/slides/page-element)
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()
Returns the list of [Shape](/apps-script/reference/slides/shape)
objects on the page.
Return
[Shape[]](/apps-script/reference/slides/shape)
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
getSheetsCharts()
Returns the list of [SheetsChart](/apps-script/reference/slides/sheets-chart)
objects on the page.
Return
[SheetsChart[]](/apps-script/reference/slides/sheets-chart)
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
getTables()
Returns the list of [Table](/apps-script/reference/slides/table)
objects on the page.
Return
[Table[]](/apps-script/reference/slides/table)
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
getVideos()
Returns the list of [Video](/apps-script/reference/slides/video)
objects on the page.
Return
[Video[]](/apps-script/reference/slides/video)
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
getWordArts()
Returns the list of [WordArt](/apps-script/reference/slides/word-art)
objects on the page.
Return
[WordArt[]](/apps-script/reference/slides/word-art)
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
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-12-02 UTC.