NotesPage

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 |
|---|---|---|
| `https://developers.google.com/apps-script/reference/slides/notes-page#getGroups()` | `https://developers.google.com/apps-script/reference/slides/group` | Returns the list of `https://developers.google.com/apps-script/reference/slides/group` objects on the page. |
| `https://developers.google.com/apps-script/reference/slides/notes-page#getImages()` | `https://developers.google.com/apps-script/reference/slides/image` | Returns the list of `https://developers.google.com/apps-script/reference/slides/image` objects on the page. |
| `https://developers.google.com/apps-script/reference/slides/notes-page#getLines()` | `https://developers.google.com/apps-script/reference/slides/line` | Returns the list of `https://developers.google.com/apps-script/reference/slides/line` objects on the page. |
| `https://developers.google.com/apps-script/reference/slides/notes-page#getObjectId()` | `String` | Gets the unique ID for the page. |
| `https://developers.google.com/apps-script/reference/slides/notes-page#getPageElementById(String)` | `https://developers.google.com/apps-script/reference/slides/page-element|null` | Returns the `https://developers.google.com/apps-script/reference/slides/page-element` on the page with the given ID, or `null` if none exists. |
| `https://developers.google.com/apps-script/reference/slides/notes-page#getPageElements()` | `https://developers.google.com/apps-script/reference/slides/page-element` | Returns the list of `https://developers.google.com/apps-script/reference/slides/page-element` objects rendered on the page. |
| `https://developers.google.com/apps-script/reference/slides/notes-page#getPlaceholder(PlaceholderType)` | `https://developers.google.com/apps-script/reference/slides/page-element|null` | Returns the placeholder `https://developers.google.com/apps-script/reference/slides/page-element` object for a specified `https://developers.google.com/apps-script/reference/slides/placeholder-type` or `null` if a matching placeholder is not present. |
| `https://developers.google.com/apps-script/reference/slides/notes-page#getPlaceholder(PlaceholderType,Integer)` | `https://developers.google.com/apps-script/reference/slides/page-element|null` | Returns the placeholder `https://developers.google.com/apps-script/reference/slides/page-element` object for a specified `https://developers.google.com/apps-script/reference/slides/placeholder-type` and a placeholder index, or `null` if the placeholder is not present. |
| `https://developers.google.com/apps-script/reference/slides/notes-page#getPlaceholders()` | `https://developers.google.com/apps-script/reference/slides/page-element` | Returns the list of placeholder `https://developers.google.com/apps-script/reference/slides/page-element` objects in the page. |
| `https://developers.google.com/apps-script/reference/slides/notes-page#getShapes()` | `https://developers.google.com/apps-script/reference/slides/shape` | Returns the list of `https://developers.google.com/apps-script/reference/slides/shape` objects on the page. |
| `https://developers.google.com/apps-script/reference/slides/notes-page#getSheetsCharts()` | `https://developers.google.com/apps-script/reference/slides/sheets-chart` | Returns the list of `https://developers.google.com/apps-script/reference/slides/sheets-chart` objects on the page. |
| `https://developers.google.com/apps-script/reference/slides/notes-page#getSpeakerNotesShape()` | `https://developers.google.com/apps-script/reference/slides/shape` | Gets the shape containing the speaker notes on the page. |
| `https://developers.google.com/apps-script/reference/slides/notes-page#getTables()` | `https://developers.google.com/apps-script/reference/slides/table` | Returns the list of `https://developers.google.com/apps-script/reference/slides/table` objects on the page. |
| `https://developers.google.com/apps-script/reference/slides/notes-page#getVideos()` | `https://developers.google.com/apps-script/reference/slides/video` | Returns the list of `https://developers.google.com/apps-script/reference/slides/video` objects on the page. |
| `https://developers.google.com/apps-script/reference/slides/notes-page#getWordArts()` | `https://developers.google.com/apps-script/reference/slides/word-art` | Returns the list of `https://developers.google.com/apps-script/reference/slides/word-art` objects on the page. |
| `https://developers.google.com/apps-script/reference/slides/notes-page#replaceAllText(String,String)` | `Integer` | Replaces all instances of text matching find text with replace text. |
| `https://developers.google.com/apps-script/reference/slides/notes-page#replaceAllText(String,String,Boolean)` | `Integer` | Replaces all instances of text matching find text with replace text. |

## Detailed documentation

### `getGroups()`

Returns the list of `https://developers.google.com/apps-script/reference/slides/group` objects on the page.

#### Return


`https://developers.google.com/apps-script/reference/slides/group`

#### Authorization

Scripts that use this method require authorization with one or more of the following [scopes](https://developers.google.com/apps-script/concepts/scopes#setting_explicit_scopes):

- `https://www.googleapis.com/auth/presentations.currentonly`
- `https://www.googleapis.com/auth/presentations`

*** ** * ** ***

### `getImages()`

Returns the list of `https://developers.google.com/apps-script/reference/slides/image` objects on the page.

#### Return


`https://developers.google.com/apps-script/reference/slides/image`

#### Authorization

Scripts that use this method require authorization with one or more of the following [scopes](https://developers.google.com/apps-script/concepts/scopes#setting_explicit_scopes):

- `https://www.googleapis.com/auth/presentations.currentonly`
- `https://www.googleapis.com/auth/presentations`

*** ** * ** ***

### `getLines()`

Returns the list of `https://developers.google.com/apps-script/reference/slides/line` objects on the page.

#### Return


`https://developers.google.com/apps-script/reference/slides/line`

#### Authorization

Scripts that use this method require authorization with one or more of the following [scopes](https://developers.google.com/apps-script/concepts/scopes#setting_explicit_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://developers.google.com/apps-script/concepts/scopes#setting_explicit_scopes):

- `https://www.googleapis.com/auth/presentations.currentonly`
- `https://www.googleapis.com/auth/presentations`

*** ** * ** ***

### `getPageElementById(id)`

Returns the `https://developers.google.com/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


`https://developers.google.com/apps-script/reference/slides/page-element|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://developers.google.com/apps-script/concepts/scopes#setting_explicit_scopes):

- `https://www.googleapis.com/auth/presentations.currentonly`
- `https://www.googleapis.com/auth/presentations`

*** ** * ** ***

### `getPageElements()`

Returns the list of `https://developers.google.com/apps-script/reference/slides/page-element` objects rendered on the page.

#### Return


`https://developers.google.com/apps-script/reference/slides/page-element`

#### Authorization

Scripts that use this method require authorization with one or more of the following [scopes](https://developers.google.com/apps-script/concepts/scopes#setting_explicit_scopes):

- `https://www.googleapis.com/auth/presentations.currentonly`
- `https://www.googleapis.com/auth/presentations`

*** ** * ** ***

### `getPlaceholder(placeholderType)`

Returns the placeholder `https://developers.google.com/apps-script/reference/slides/page-element` object for a specified `https://developers.google.com/apps-script/reference/slides/placeholder-type` 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.

```javascript
const slide = SlidesApp.getActivePresentation().getSlides()[0];
const placeholder = slide.getPlaceholder(
    SlidesApp.PlaceholderType.CENTERED_TITLE,
);
```

#### Parameters

| Name | Type | Description |
|---|---|---|
| `placeholderType` | `https://developers.google.com/apps-script/reference/slides/placeholder-type` | The placeholder type to match. |

#### Return


`https://developers.google.com/apps-script/reference/slides/page-element|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://developers.google.com/apps-script/concepts/scopes#setting_explicit_scopes):

- `https://www.googleapis.com/auth/presentations.currentonly`
- `https://www.googleapis.com/auth/presentations`

*** ** * ** ***

### `getPlaceholder(placeholderType, placeholderIndex)`

Returns the placeholder `https://developers.google.com/apps-script/reference/slides/page-element` object for a specified `https://developers.google.com/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.

```javascript
const slide = SlidesApp.getActivePresentation().getSlides()[0];
const placeholder = slide.getPlaceholder(
    SlidesApp.PlaceholderType.CENTERED_TITLE,
    0,
);
```

#### Parameters

| Name | Type | Description |
|---|---|---|
| `placeholderType` | `https://developers.google.com/apps-script/reference/slides/placeholder-type` | The placeholder type to match. |
| `placeholderIndex` | `Integer` | The placeholder index to match. |

#### Return


`https://developers.google.com/apps-script/reference/slides/page-element|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://developers.google.com/apps-script/concepts/scopes#setting_explicit_scopes):

- `https://www.googleapis.com/auth/presentations.currentonly`
- `https://www.googleapis.com/auth/presentations`

*** ** * ** ***

### `getPlaceholders()`

Returns the list of placeholder `https://developers.google.com/apps-script/reference/slides/page-element` objects in the page.

```javascript
const master = SlidesApp.getActivePresentation().getMasters()[0];
Logger.log(
    `Number of placeholders in the master: ${master.getPlaceholders().length}`,
);
```

#### Return


`https://developers.google.com/apps-script/reference/slides/page-element`

#### Authorization

Scripts that use this method require authorization with one or more of the following [scopes](https://developers.google.com/apps-script/concepts/scopes#setting_explicit_scopes):

- `https://www.googleapis.com/auth/presentations.currentonly`
- `https://www.googleapis.com/auth/presentations`

*** ** * ** ***

### `getShapes()`

Returns the list of `https://developers.google.com/apps-script/reference/slides/shape` objects on the page.

#### Return


`https://developers.google.com/apps-script/reference/slides/shape`

#### Authorization

Scripts that use this method require authorization with one or more of the following [scopes](https://developers.google.com/apps-script/concepts/scopes#setting_explicit_scopes):

- `https://www.googleapis.com/auth/presentations.currentonly`
- `https://www.googleapis.com/auth/presentations`

*** ** * ** ***

### `getSheetsCharts()`

Returns the list of `https://developers.google.com/apps-script/reference/slides/sheets-chart` objects on the page.

#### Return


`https://developers.google.com/apps-script/reference/slides/sheets-chart`

#### Authorization

Scripts that use this method require authorization with one or more of the following [scopes](https://developers.google.com/apps-script/concepts/scopes#setting_explicit_scopes):

- `https://www.googleapis.com/auth/presentations.currentonly`
- `https://www.googleapis.com/auth/presentations`

*** ** * ** ***

### `getSpeakerNotesShape()`

Gets the shape containing the speaker notes on the page.

#### Return


`https://developers.google.com/apps-script/reference/slides/shape`

#### Authorization

Scripts that use this method require authorization with one or more of the following [scopes](https://developers.google.com/apps-script/concepts/scopes#setting_explicit_scopes):

- `https://www.googleapis.com/auth/presentations.currentonly`
- `https://www.googleapis.com/auth/presentations`

*** ** * ** ***

### `getTables()`

Returns the list of `https://developers.google.com/apps-script/reference/slides/table` objects on the page.

#### Return


`https://developers.google.com/apps-script/reference/slides/table`

#### Authorization

Scripts that use this method require authorization with one or more of the following [scopes](https://developers.google.com/apps-script/concepts/scopes#setting_explicit_scopes):

- `https://www.googleapis.com/auth/presentations.currentonly`
- `https://www.googleapis.com/auth/presentations`

*** ** * ** ***

### `getVideos()`

Returns the list of `https://developers.google.com/apps-script/reference/slides/video` objects on the page.

#### Return


`https://developers.google.com/apps-script/reference/slides/video`

#### Authorization

Scripts that use this method require authorization with one or more of the following [scopes](https://developers.google.com/apps-script/concepts/scopes#setting_explicit_scopes):

- `https://www.googleapis.com/auth/presentations.currentonly`
- `https://www.googleapis.com/auth/presentations`

*** ** * ** ***

### `getWordArts()`

Returns the list of `https://developers.google.com/apps-script/reference/slides/word-art` objects on the page.

#### Return


`https://developers.google.com/apps-script/reference/slides/word-art`

#### Authorization

Scripts that use this method require authorization with one or more of the following [scopes](https://developers.google.com/apps-script/concepts/scopes#setting_explicit_scopes):

- `https://www.googleapis.com/auth/presentations.currentonly`
- `https://www.googleapis.com/auth/presentations`

*** ** * ** ***

### `replaceAllText(findText, replaceText)`

Replaces all instances of text matching find text with replace text. The search is case
insensitive.

#### Parameters

| Name | Type | Description |
|---|---|---|
| `findText` | `String` | The text to find. |
| `replaceText` | `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://developers.google.com/apps-script/concepts/scopes#setting_explicit_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 |
|---|---|---|
| `findText` | `String` | The text to find. |
| `replaceText` | `String` | The text to replace the matched text. |
| `matchCase` | `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://developers.google.com/apps-script/concepts/scopes#setting_explicit_scopes):

- `https://www.googleapis.com/auth/presentations.currentonly`
- `https://www.googleapis.com/auth/presentations`