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

# Other classes: References and fields

## `Bookmark`

One bookmark: its name, the span its markers enclose, and the marker offsets.

Import from `@reductoai/docx/officejs`.

### Bookmark properties

| Name | Type | Description |
| - | - | - |
| `end` | `number` | UTF-16 offset of the end marker, LOCAL TO ITS PARAGRAPH, not a story offset. |
| `isColumn` | `boolean` | read-only Table-column bookmarks are a Word selection artifact; OfficeJS here authors none. |
| `isEmpty` | `boolean` | read-only The end marker sits at the start marker's own point: the bookmark covers no text. |
| `name` | `string` | read-only The stored name, in the case the document holds it. |
| `range` | `Range` | read-only A live range over the covered span; a bookmark ending later spans its paragraphs. |
| `start` | `number` | UTF-16 offset of the start marker, LOCAL TO ITS PARAGRAPH, not a story offset. |
| `storyType` | `string` | read-only Word.StoryType, in the vocabulary Range.storyType reports. |

### `Bookmark.delete()`

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

Drop both markers; the text they enclosed stays put.

### `Bookmark.set()`

```ts theme={null}
set(properties: BookmarkUpdateData, options?: UpdateOptions): void
```

**Not implemented.** These Office.js members throw: `select`.

## `Field`

One field, frozen at collection access (re-reading `fields.items` gives
fresh snapshots). Reads throw once the field leaves the document.

Import from `@reductoai/docx/officejs`.

### Field properties

| Name | Type | Description |
| - | - | - |
| `code` | `string` | The raw instruction, padding preserved (`PAGE \\* MERGEFORMAT`). |
| `data` | `string` | ADDIN payload (`w:fldData`); "" when the field carries none. |
| `formFieldName` | `string \| undefined` | read-only `w:ffData/w:name` of a legacy form field; undefined on every other field. |
| `isChecked` | `boolean \| undefined` | The stored state of a legacy FORMCHECKBOX field (`w:ffData/w:checkBox`). Other field types have no checkbox state and return undefined. |
| `kind` | `"None" \| "Cold" \| "Hot" \| "Warm"` | read-only How Word treats the cached result: \| kind   \| when \| \|--------\|------\| \| None   \| the instruction is not a known field type \| \| Cold   \| no separator, so the field caches nothing (XE, TC, TA, PRIVATE) \| \| Hot    \| Word recomputes it on open or print (DATE, PAGE count, file info) \| \| Warm   \| a cached result, refreshed on demand \| |
| `listEntries` | `string[] \| undefined` | read-only The entries of a legacy FORMDROPDOWN (`w:ffData/w:ddList`); undefined on other field types. |
| `locked` | `boolean` | `w:fldLock`: Word refuses to refresh a locked field, and so does update(). |
| `parentBody` | `Body \| HeaderFooter` | read-only The story scope holding the field: the cell body, the document body, or the part. |
| `parentContentControl` | `ContentControl` | read-only |
| `parentContentControlOrNullObject` | `ContentControl & { isNullObject: boolean }` | read-only |
| `parentParagraph` | `Paragraph` | read-only The paragraph holding the field's begin anchor (w:fldSimple or the begin w:fldChar). |
| `parentTable` | `Table` | read-only |
| `parentTableCell` | `TableCell` | read-only |
| `parentTableCellOrNullObject` | `TableCell & { isNullObject: boolean }` | read-only |
| `parentTableOrNullObject` | `Table & { isNullObject: boolean }` | read-only |
| `result` | `Range` | read-only |
| `selectedIndex` | `number \| undefined` | The shown entry of a legacy FORMDROPDOWN: `w:result`, else `w:default`, else 0. |
| `showCodes` | `boolean` | |
| `textInput` | `LegacyTextInput \| undefined` | read-only Settings of a legacy FORMTEXT (`w:ffData/w:textInput`); the value itself is `result`. |
| `type` | `FieldTypeValue` | read-only |

### `Field.delete()`

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

Remove the field machinery and its cached result.

### `Field.getNext()`

```ts theme={null}
getNext(): Field
```

The next field of the same story in document order.

### `Field.getNextOrNullObject()`

```ts theme={null}
getNextOrNullObject(): Field & { isNullObject: boolean }
```

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

### `Field.set()`

```ts theme={null}
set(properties: FieldUpdateData, options?: UpdateOptions): void
```

### `Field.unlink()`

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

Replace the field with its cached result runs, formatting preserved.

### `Field.updateResult()`

```ts theme={null}
updateResult(): Promise<void>
```

Recompute the cached result. Async because page numbers come from a
layout pass; types no headless source can compute throw by name.

**Not implemented.** These Office.js members throw: `linkFormat`, `oleFormat`, `copyToClipboard`, `cut`, `doClick`, `select`, `updateSource`.

## `FieldCollection`

Import from `@reductoai/docx/node`, `@reductoai/docx/officejs`.

### FieldCollection properties

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

### `FieldCollection.getByTypes()`

```ts theme={null}
getByTypes(types: readonly FieldTypeValue[]): FieldCollection
```

### `FieldCollection.getFirst()`

```ts theme={null}
getFirst(): Field
```

### `FieldCollection.getFirstOrNullObject()`

```ts theme={null}
getFirstOrNullObject(): Field & { isNullObject: boolean }
```

## `Hyperlink`

One hyperlink: its shell, its destination, its visible text and its span.

Import from `@reductoai/docx/officejs`.

### Hyperlink properties

| Name | Type | Description |
| - | - | - |
| `address` | `string` | The whole destination: the relationship URL, or `"#Bookmark"` for an internal link. |
| `emailSubject` | `string` | The `subject=` query of a `mailto:` address; "" for every other scheme. |
| `isExtraInfoRequired` | `boolean` | read-only No headless destination needs a second resolution step. |
| `name` | `string` | read-only VBA's notion of a link's name: its address. |
| `range` | `Range` | read-only A live range over the link's own text, minted like getHyperlinkRanges does. |
| `screenTip` | `string` | The ScreenTip (`w:tooltip`); "" both reads and clears it. |
| `subAddress` | `string` | The named location in the destination: `w:anchor`, or the address's own fragment. |
| `target` | `string` | The frame or window the target loads into (`w:tgtFrame`). |
| `textToDisplay` | `string` | The link's visible text — the ink between its shell's tags. |
| `type` | `"Range"` | read-only Word.HyperlinkType: OfficeJS here links text spans only, never shapes. |

### `Hyperlink.delete()`

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

Remove the SHELL and keep its text in place, as Word's Remove Hyperlink
does: the children are re-parented where the `w:hyperlink` stood.

### `Hyperlink.set()`

```ts theme={null}
set(properties: HyperlinkUpdateData, options?: UpdateOptions): void
```

**Not implemented.** These Office.js members throw: `addToFavorites`, `createNewDocument`.

## `Index`

Import from `@reductoai/docx/officejs`.

### Index properties

| Name | Type | Description |
| - | - | - |
| `filter` | `IndexFilter` | read-only Word writes no switch for a filter on an English index. |
| `headingSeparator` | `HeadingSeparator` | read-only |
| `indexLanguage` | `string` | read-only The `LanguageId` name of the `\z` LCID, or the LCID itself when the table has no name for it. |
| `numberOfColumns` | `number` | read-only |
| `range` | `Range` | read-only |
| `rightAlignPageNumbers` | `boolean` | read-only |
| `separateAccentedLetterHeadings` | `boolean` | read-only |
| `sortBy` | `IndexSortBy` | read-only |
| `tabLeader` | `TabLeaderValue` | |
| `type` | `IndexType` | read-only |

### `Index.delete()`

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

### `Index.set()`

```ts theme={null}
set(properties: IndexUpdateData, options?: UpdateOptions): void
```

### `Index.update()`

```ts theme={null}
update(): Promise<void>
```

Extension: Office.js has no Index update; this rebuilds the list from the XE marks.

## `IndexCollection`

Import from `@reductoai/docx/officejs`.

### IndexCollection properties

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

### `IndexCollection.add()`

```ts theme={null}
add(range: Range, indexAddOptions?: IndexAddOptions): Index
```

The field lands without a result; `update()` builds the list.

### `IndexCollection.getFormat()`

```ts theme={null}
getFormat(): ClientResult<IndexFormat>
```

The index styles carry Word's own look until a format is applied.

### `IndexCollection.markAllEntries()`

```ts theme={null}
markAllEntries(range: Range, markAllEntriesOptions?: IndexMarkAllEntriesOptions): void
```

An XE mark after the first place the range's text stands in each paragraph.

## `NoteItem`

One footnote or endnote: its mark in the story plus its body in the notes part.

Import from `@reductoai/docx/officejs`.

### NoteItem properties

| Name | Type | Description |
| - | - | - |
| `body` | `Body` | read-only The note's own body, scoped to its element in the notes part. |
| `reference` | `Range` | read-only The mark's one character, read as U+0002 as in Word; its font reads and writes the mark run. |
| `type` | `NoteItemType` | read-only |

### `NoteItem.delete()`

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

Remove both halves: the note element and the mark that referenced it.

### `NoteItem.getNext()`

```ts theme={null}
getNext(): NoteItem
```

### `NoteItem.getNextOrNullObject()`

```ts theme={null}
getNextOrNullObject(): NoteItem & { isNullObject: true } | NoteItem & { isNullObject: false }
```

### `NoteItem.set()`

```ts theme={null}
set(properties: NoteItemUpdateData, options?: UpdateOptions): void
```

## `TableOfAuthorities`

Import from `@reductoai/docx/officejs`.

### TableOfAuthorities properties

| Name | Type | Description |
| - | - | - |
| `bookmark` | `string` | |
| `category` | `number` | 1 through 16, as `TableOfAuthoritiesCategoryCollection` numbers them from 0. |
| `entrySeparator` | `string` | |
| `isCategoryHeaderIncluded` | `boolean` | |
| `isEntryFormattingKept` | `boolean` | |
| `isPassimUsed` | `boolean` | |
| `pageNumberSeparator` | `string` | |
| `pageRangeSeparator` | `string` | |
| `range` | `Range` | read-only |
| `sequenceName` | `string` | |
| `sequenceSeparator` | `string` | |
| `tabLeader` | `TabLeaderValue` | |

### `TableOfAuthorities.delete()`

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

### `TableOfAuthorities.set()`

```ts theme={null}
set(properties: TableOfAuthoritiesUpdateData, options?: UpdateOptions): void
```

### `TableOfAuthorities.update()`

```ts theme={null}
update(): Promise<void>
```

Extension: Office.js has no TOA update; this rebuilds the list from the TA marks.

## `TableOfAuthoritiesCategory`

Import from `@reductoai/docx/officejs`.

### TableOfAuthoritiesCategory properties

| Name | Type | Description |
| - | - | - |
| `name` | `string` | read-only |

## `TableOfAuthoritiesCategoryCollection`

Word's sixteen categories: seven named, 8 through 16 by their number.

Import from `@reductoai/docx/officejs`.

### TableOfAuthoritiesCategoryCollection properties

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

### `TableOfAuthoritiesCategoryCollection.getCount()`

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

### `TableOfAuthoritiesCategoryCollection.getItemAt()`

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

## `TableOfAuthoritiesCollection`

Import from `@reductoai/docx/officejs`.

### TableOfAuthoritiesCollection properties

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

### `TableOfAuthoritiesCollection.add()`

```ts theme={null}
add(range: Range, options?: TableOfAuthoritiesAddOptions): TableOfAuthorities
```

The field lands without a result, as `tablesOfContents.add`; `update()` builds the list.

### `TableOfAuthoritiesCollection.markAllCitations()`

```ts theme={null}
markAllCitations(
  shortCitation: string,
  options?: TableOfAuthoritiesMarkCitationOptions,
): void
```

Marks every place the short or long citation stands that carries no mark of it yet.

### `TableOfAuthoritiesCollection.markCitation()`

```ts theme={null}
markCitation(
  range: Range,
  shortCitation: string,
  options?: TableOfAuthoritiesMarkCitationOptions,
): Field
```

A TA mark after the range: the long form on a citation's first mark, the short one after.

**Not implemented.** These Office.js members throw: `selectNextCitation`.

## `TableOfContents`

Import from `@reductoai/docx/node`, `@reductoai/docx/officejs`.

### TableOfContents properties

| Name | Type | Description |
| - | - | - |
| `additionalHeadingStyles` | `HeadingStyleCollection` | read-only |
| `areBuiltInHeadingStylesUsed` | `boolean` | |
| `areFieldsUsed` | `boolean` | |
| `areHyperlinksUsedOnWeb` | `boolean` | |
| `arePageNumbersHiddenOnWeb` | `boolean` | |
| `arePageNumbersIncluded` | `boolean` | |
| `arePageNumbersRightAligned` | `boolean` | |
| `lowerHeadingLevel` | `number` | |
| `range` | `Range` | read-only |
| `tabLeader` | `TabLeaderValue` | |
| `tableId` | `string` | |
| `upperHeadingLevel` | `number` | |

### `TableOfContents.delete()`

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

### `TableOfContents.set()`

```ts theme={null}
set(properties: TableOfContentsUpdateData, options?: UpdateOptions): void
```

### `TableOfContents.update()`

```ts theme={null}
update(): Promise<void>
```

### `TableOfContents.updatePageNumbers()`

```ts theme={null}
updatePageNumbers(): Promise<void>
```

## `TableOfContentsCollection`

Import from `@reductoai/docx/node`, `@reductoai/docx/officejs`.

### TableOfContentsCollection properties

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

### `TableOfContentsCollection.add()`

```ts theme={null}
add(range: Range, options?: TableOfContentsAddOptions): TableOfContents
```

### `TableOfContentsCollection.markTocEntry()`

```ts theme={null}
markTocEntry(range: Range, options?: TableOfContentsMarkEntryOptions): Field
```

## `TableOfFigures`

A table of figures is a TOC over captions; Word keeps the label in `\c`, or in `\a` without it.

Import from `@reductoai/docx/officejs`. Extends [`TableOfContents`](https://docs.reducto.ai/office/docx/api/more-classes-references-and-fields#tableofcontents).

### TableOfFigures properties

| Name | Type | Description |
| - | - | - |
| `additionalHeadingStyles` | `HeadingStyleCollection` | read-only |
| `areBuiltInHeadingStylesUsed` | `boolean` | |
| `areFieldsUsed` | `boolean` | |
| `areHyperlinksUsedOnWeb` | `boolean` | |
| `arePageNumbersHiddenOnWeb` | `boolean` | |
| `arePageNumbersIncluded` | `boolean` | |
| `arePageNumbersRightAligned` | `boolean` | |
| `captionLabel` | `string` | |
| `isLabelIncluded` | `boolean` | |
| `lowerHeadingLevel` | `number` | |
| `range` | `Range` | read-only |
| `tabLeader` | `TabLeaderValue` | |
| `tableId` | `string` | |
| `upperHeadingLevel` | `number` | |

### `TableOfFigures.delete()`

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

### `TableOfFigures.set()`

```ts theme={null}
set(properties: TableOfFiguresUpdateData, options?: UpdateOptions): void
```

### `TableOfFigures.update()`

```ts theme={null}
update(): Promise<void>
```

### `TableOfFigures.updatePageNumbers()`

```ts theme={null}
updatePageNumbers(): Promise<void>
```

## `TableOfFiguresCollection`

Import from `@reductoai/docx/officejs`.

### TableOfFiguresCollection properties

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

### `TableOfFiguresCollection.add()`

```ts theme={null}
add(range: Range, options?: TableOfFiguresAddOptions): TableOfFigures
```

The field lands without a result; `update()` builds the list.

### `TableOfFiguresCollection.markTocEntry()`

```ts theme={null}
markTocEntry(range: Range, options?: TableOfContentsMarkEntryOptions): Field
```
