> ## 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.

# Notes, comments and links

## `SlideNotes`

Extension (VBA `Slide.NotesPage`): the speaker notes under a slide.

Import from `@reductoai/pptx/officejs`.

### SlideNotes properties

| Name | Type | Description |
| - | - | - |
| `text` | `string` | The notes as plain text; paragraphs are joined by "\r". Setting "" keeps an empty notes page. |

## `Comment`

Extension (VBA `Comment`): a comment thread or one of its replies on a slide. Comments in
PowerPoint 2013's format are read-only (`legacy`).

Import from `@reductoai/pptx/officejs`.

### Comment properties

| Name | Type | Description |
| - | - | - |
| `id` | `string` | read-only |
| `author` | `string` | read-only |
| `authorInitials` | `string` | read-only |
| `cell` | `{ colId: string; rowId: string } \| undefined` | read-only Extension: the table cell the thread points at, by `a16:rowId` and `a16:colId`. |
| `dateTime` | `Date \| undefined` | read-only When the comment was written; undefined when the file does not say. |
| `left` | `number \| undefined` | read-only Pin position in points; undefined for a reply or a comment with no pin. |
| `legacy` | `boolean` | read-only Extension: true for a PowerPoint 2013 comment, which is read-only. |
| `replies` | `CommentCollection` | read-only VBA `Comment.Replies`; empty for a reply. |
| `resolved` | `boolean` | Extension: whether the thread is resolved; a reply follows its thread. |
| `shapeId` | `string \| undefined` | read-only Extension: `p:cNvPr@id` of the shape the thread points at. |
| `text` | `string` | The comment's text; paragraphs are joined by "\n". |
| `textRange` | `{ length: number; start: number } \| undefined` | read-only Extension: the characters the thread points at in its shape's or cell's text. |
| `top` | `number \| undefined` | read-only |

### `Comment.delete()`

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

Deletes a thread with its replies, or one reply.

## `CommentCollection`

Extension (VBA `Comments`): a slide's comment threads, oldest first, or the replies of one
thread. Address items by `id`.

Import from `@reductoai/pptx/officejs`.

### CommentCollection properties

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

### `CommentCollection.add()`

```ts theme={null}
add(text: string, options: CommentAddOptions): Comment
```

Extension: a new thread, on a shape or pinned at a point, or a reply on a thread's `replies`.

### `CommentCollection.add2()`

```ts theme={null}
add2(
  left: number,
  top: number,
  author: string,
  authorInitials: string,
  text: string,
  providerID?: string,
  userID?: string,
): Comment
```

VBA `Comments.Add2`: a new thread pinned at `left`, `top` (points), or a reply when this
collection is a thread's `replies` (the position is then ignored).

### `CommentCollection.getCount()`

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

### `CommentCollection.getItem()`

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

### `CommentCollection.getItemAt()`

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

### `CommentCollection.getItemOrNullObject()`

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

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

## `Hyperlink`

`PowerPoint.Hyperlink`: a link on a run of text or on a whole shape.

Import from `@reductoai/pptx/officejs`.

### Hyperlink properties

| Name | Type | Description |
| - | - | - |
| `address` | `string` | The external target; an action such as a jump to a slide reads "". |
| `screenTip` | `string` | |
| `type` | `HyperlinkType` | read-only |

### `Hyperlink.delete()`

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

### `Hyperlink.getLinkedShapeOrNullObject()`

```ts theme={null}
getLinkedShapeOrNullObject(): Shape & { isNullObject: boolean }
```

### `Hyperlink.getLinkedTextRangeOrNullObject()`

```ts theme={null}
getLinkedTextRangeOrNullObject(): TextRange & { isNullObject: boolean }
```

## `HyperlinkCollection`

`PowerPoint.HyperlinkCollection`: every link on a slide.

Import from `@reductoai/pptx/officejs`. Extends [`HyperlinkScopedCollection`](https://docs.reducto.ai/office/pptx/api/more-classes-shapes-and-charts#hyperlinkscopedcollection).

### HyperlinkCollection properties

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

### `HyperlinkCollection.add()`

```ts theme={null}
add(target: LinkTarget, options?: HyperlinkAddOptions): Hyperlink
```

### `HyperlinkCollection.getCount()`

```ts theme={null}
getCount(): { value: number }
```

### `HyperlinkCollection.getItemAt()`

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

## `Tag`

`PowerPoint.Tag`. The handle names its tag by key, so it survives a value change.

Import from `@reductoai/pptx/officejs`.

### Tag properties

| Name | Type | Description |
| - | - | - |
| `key` | `string` | read-only |
| `value` | `string` | |

## `TagCollection`

`PowerPoint.TagCollection`: `p:tagLst` in the part a `p:custDataLst/p:tags` names.

Import from `@reductoai/pptx/officejs`.

### TagCollection properties

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

### `TagCollection.add()`

```ts theme={null}
add(key: string, value: string): void
```

Replaces the value when the key is there already; keys are stored upper-case.

### `TagCollection.delete()`

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

### `TagCollection.getCount()`

```ts theme={null}
getCount(): { value: number }
```

### `TagCollection.getItem()`

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

### `TagCollection.getItemAt()`

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

### `TagCollection.getItemOrNullObject()`

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