Skip to main content

Bookmark

One bookmark: its name, the span its markers enclose, and the marker offsets. Import from @reductoai/docx/officejs.

Bookmark properties

Bookmark.delete()

Drop both markers; the text they enclosed stays put.

Bookmark.set()

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

Field.delete()

Remove the field machinery and its cached result.

Field.getNext()

The next field of the same story in document order.

Field.getNextOrNullObject()

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

Field.set()

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

Field.updateResult()

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

FieldCollection.getByTypes()

FieldCollection.getFirst()

FieldCollection.getFirstOrNullObject()

One hyperlink: its shell, its destination, its visible text and its span. Import from @reductoai/docx/officejs.
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.
Not implemented. These Office.js members throw: addToFavorites, createNewDocument.

Index

Import from @reductoai/docx/officejs.

Index properties

Index.delete()

Index.set()

Index.update()

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

IndexCollection

Import from @reductoai/docx/officejs.

IndexCollection properties

IndexCollection.add()

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

IndexCollection.getFormat()

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

IndexCollection.markAllEntries()

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

NoteItem.delete()

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

NoteItem.getNext()

NoteItem.getNextOrNullObject()

NoteItem.set()

TableOfAuthorities

Import from @reductoai/docx/officejs.

TableOfAuthorities properties

TableOfAuthorities.delete()

TableOfAuthorities.set()

TableOfAuthorities.update()

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

TableOfAuthoritiesCategory

Import from @reductoai/docx/officejs.

TableOfAuthoritiesCategory properties

TableOfAuthoritiesCategoryCollection

Word’s sixteen categories: seven named, 8 through 16 by their number. Import from @reductoai/docx/officejs.

TableOfAuthoritiesCategoryCollection properties

TableOfAuthoritiesCategoryCollection.getCount()

TableOfAuthoritiesCategoryCollection.getItemAt()

TableOfAuthoritiesCollection

Import from @reductoai/docx/officejs.

TableOfAuthoritiesCollection properties

TableOfAuthoritiesCollection.add()

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

TableOfAuthoritiesCollection.markAllCitations()

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

TableOfAuthoritiesCollection.markCitation()

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

TableOfContents.delete()

TableOfContents.set()

TableOfContents.update()

TableOfContents.updatePageNumbers()

TableOfContentsCollection

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

TableOfContentsCollection properties

TableOfContentsCollection.add()

TableOfContentsCollection.markTocEntry()

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.

TableOfFigures properties

TableOfFigures.delete()

TableOfFigures.set()

TableOfFigures.update()

TableOfFigures.updatePageNumbers()

TableOfFiguresCollection

Import from @reductoai/docx/officejs.

TableOfFiguresCollection properties

TableOfFiguresCollection.add()

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

TableOfFiguresCollection.markTocEntry()