> ## Documentation Index
> Fetch the complete documentation index at: https://docs.reducto.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Slides

## `Slide`

`PowerPoint.Slide`.

Import from `@reductoai/pptx/officejs`.

### Slide properties

| Name | Type | Description |
| - | - | - |
| `id` | `string` | read-only |
| `shapes` | `ShapeCollection` | read-only |
| `background` | `SlideBackground` | read-only |
| `comments` | `CommentCollection` | read-only Extension (VBA `Slide.Comments`): the slide's comment threads, oldest first. |
| `customXmlParts` | `CustomXmlPartCollection` | read-only |
| `headersFooters` | `HeadersFooters` | read-only Extension (VBA `Slide.HeadersFooters`): the slide's footer, slide number and date. |
| `hyperlinks` | `HyperlinkCollection` | read-only |
| `index` | `number` | read-only |
| `layout` | `SlideLayout` | read-only |
| `notes` | `SlideNotes` | read-only Extension (VBA `Slide.NotesPage`): the slide's speaker notes. |
| `sectionIndex` | `number` | read-only Extension (VBA `Slide.sectionIndex`): zero-based index of the slide's section; -1 when the deck has none. |
| `slideMaster` | `SlideMaster` | read-only |
| `slideShowTransition` | `SlideShowTransition` | read-only Extension (VBA `Slide.SlideShowTransition`). |
| `tags` | `TagCollection` | read-only |
| `themeColorScheme` | `ThemeColorScheme` | read-only |

### `Slide.applyLayout()`

```ts theme={null}
applyLayout(slideLayout: SlideLayout): void
```

### `Slide.delete()`

```ts theme={null}
delete(): void
```

### `Slide.exportAsBase64()`

```ts theme={null}
exportAsBase64(): Promise<string>
```

Office.js queues a ClientResult; the facade resolves the Base64 .pptx holding this slide.

### `Slide.getImageAsBase64()`

```ts theme={null}
getImageAsBase64(options?: ImageSizeOptions): Promise<string>
```

Office.js queues a ClientResult; the facade resolves a Base64 PNG of the slide.

### `Slide.moveTo()`

```ts theme={null}
moveTo(slideIndex: number): void
```

### `Slide.moveToSectionStart()`

```ts theme={null}
moveToSectionStart(sectionIndex: number): void
```

Extension (VBA `Slide.MoveToSectionStart`): the slide moves to the start of section `sectionIndex`.

## `SlideCollection`

`PowerPoint.SlideCollection`.

Import from `@reductoai/pptx/officejs`.

### SlideCollection properties

| Name | Type | Description |
| - | - | - |
| `items` | `T[]` | read-only |

### `SlideCollection.add()`

```ts theme={null}
add(options?: AddSlideOptions): Slide
```

Office.js returns nothing; the facade also returns the new slide. Without a
`layoutId` the slide takes the first layout of the (first) master, as Office does.

### `SlideCollection.exportAsBase64Presentation()`

```ts theme={null}
exportAsBase64Presentation(values: (string | Slide)[]): Promise<string>
```

Office.js queues a ClientResult; the facade resolves the Base64 .pptx holding the slides.

### `SlideCollection.getCount()`

```ts theme={null}
getCount(): ClientResult<number>
```

### `SlideCollection.getItem()`

```ts theme={null}
getItem(key: string): Slide
```

### `SlideCollection.getItemAt()`

```ts theme={null}
getItemAt(index: number): Slide
```

### `SlideCollection.getItemOrNullObject()`

```ts theme={null}
getItemOrNullObject(key: string): Slide & { isNullObject: boolean }
```

Office.js null-object variant; inspect `isNullObject` before other members.

## `AddSlideOptions`

Import from `@reductoai/pptx/officejs`.

| Name | Type | Description |
| - | - | - |
| `index?` | `number` | |
| `layoutId?` | `string` | |
| `slideMasterId?` | `string` | |

## `SlideLayout`

`PowerPoint.SlideLayout`.

Import from `@reductoai/pptx/officejs`.

### SlideLayout properties

| Name | Type | Description |
| - | - | - |
| `id` | `string` | read-only |
| `shapes` | `ShapeCollection` | read-only |
| `background` | `SlideLayoutBackground` | read-only |
| `customXmlParts` | `CustomXmlPartCollection` | read-only |
| `guides` | `GuideCollection` | read-only Extension (VBA `CustomLayout.Guides`): guides every slide of this layout shows and cannot move. |
| `name` | `string` | Extension: Office.js has it read-only; VBA `CustomLayout.Name` writes it. |
| `slideMaster` | `SlideMaster` | read-only |
| `themeColorScheme` | `ThemeColorScheme` | read-only |
| `type` | `SlideLayoutType` | `p:sldLayout@type`; the schema default is `cust`. |

### `SlideLayout.delete()`

```ts theme={null}
delete(): void
```

Extension (VBA `CustomLayout.Delete`): throws while a slide uses the layout.

## `SlideLayoutCollection`

`PowerPoint.SlideLayoutCollection`.

Import from `@reductoai/pptx/officejs`.

### SlideLayoutCollection properties

| Name | Type | Description |
| - | - | - |
| `items` | `T[]` | read-only |

### `SlideLayoutCollection.add()`

```ts theme={null}
add(index?: number): SlideLayout
```

Extension (VBA `CustomLayouts.Add`): a "Custom Layout" at `index` (default: last) with the
master's title, date, footer and slide number placeholders, which keep the master's geometry.

### `SlideLayoutCollection.getCount()`

```ts theme={null}
getCount(): ClientResult<number>
```

### `SlideLayoutCollection.getItem()`

```ts theme={null}
getItem(key: string): SlideLayout
```

### `SlideLayoutCollection.getItemAt()`

```ts theme={null}
getItemAt(index: number): SlideLayout
```

### `SlideLayoutCollection.getItemOrNullObject()`

```ts theme={null}
getItemOrNullObject(key: string): SlideLayout & { isNullObject: boolean }
```

Office.js null-object variant; inspect `isNullObject` before other members.

## `SlideMaster`

`PowerPoint.SlideMaster`.

Import from `@reductoai/pptx/officejs`.

### SlideMaster properties

| Name | Type | Description |
| - | - | - |
| `id` | `string` | read-only |
| `layouts` | `SlideLayoutCollection` | read-only |
| `shapes` | `ShapeCollection` | read-only |
| `background` | `SlideMasterBackground` | read-only |
| `customXmlParts` | `CustomXmlPartCollection` | read-only |
| `guides` | `GuideCollection` | read-only Extension (VBA `Master.Guides`): guides every slide of this master shows and cannot move. |
| `headersFooters` | `HeadersFooters` | read-only Extension (VBA `Master.HeadersFooters`): what new slides take and the text the layouts show. |
| `name` | `string` | Extension: Office.js has it read-only; VBA `Master.Name` writes it. |
| `textStyles` | `TextStyleCollection` | read-only Extension (VBA `Master.TextStyles`): the title, body and default text formats slides inherit. |
| `themeColorScheme` | `ThemeColorScheme` | read-only |
| `themeFontScheme` | `ThemeFontScheme` | read-only Extension (VBA `Master.Theme.ThemeFontScheme`). |

### `SlideMaster.getLayoutByName()`

```ts theme={null}
getLayoutByName(name: string): SlideLayout
```

Headless helper: the layout whose `p:cSld@name` is `name` (Office's "Blank", "Title Only", …).

## `SlideMasterCollection`

`PowerPoint.SlideMasterCollection`.

Import from `@reductoai/pptx/officejs`.

### SlideMasterCollection properties

| Name | Type | Description |
| - | - | - |
| `items` | `T[]` | read-only |

### `SlideMasterCollection.getCount()`

```ts theme={null}
getCount(): ClientResult<number>
```

### `SlideMasterCollection.getItem()`

```ts theme={null}
getItem(key: string): SlideMaster
```

### `SlideMasterCollection.getItemAt()`

```ts theme={null}
getItemAt(index: number): SlideMaster
```

### `SlideMasterCollection.getItemOrNullObject()`

```ts theme={null}
getItemOrNullObject(key: string): SlideMaster & { isNullObject: boolean }
```

Office.js null-object variant; inspect `isNullObject` before other members.
