API member directory

Find every public editing API class, member group, enum, support type, and host extension.

Use this directory to find task examples and runtime limits for the public API. The generated API reference provides exact declarations, overloads, and enum values. The repository also publishes generated declarations for the root entry and browser entry.

A declaration or enum value does not guarantee runtime support for every document or argument. Read the linked guide before choosing an operation. Members marked @internal, including factories and hydration helpers, are not supported application APIs. Obtain model objects from context.document; do not construct them.

Runtime and common members

Public symbolMembers or valuesGuide
DocxEditor, DocxEditorNamespacecreateServer, createCollaborative; browser entry adds createBrowserRuntime and setup
DocxEditorRuntime, DocxEditorServerRuntimecapabilities, both run overloads, dispose; server adds saveRuntime and setup
CreateServerOptions, CreateCollaborativeOptions, CreateBrowserOptionsAuthor, revision view, host-specific parsing, modules, and paginationRuntime and setup
DocumentCapabilitiesdocument, save, events, selection, scrolling, layoutRuntime and setup
DocumentLimits, DocumentZipLimits, DocumentXmlLimits, EditorModuleInput budgets and DOM-free module contributionsRuntime and setup
ServerPaginationOptionsmeasurer, optional producerFields and pagination
RequestContext, RunCallbackdocument, capabilities, trackedObjects, sync and async callback resultBatching, loading, and errors
ClientObjectInherited context, isNullObject, and loadBatching, loading, and errors
ClientResultvalue, isLoaded; returned by RevisionCollection.resolve()Batching, loading, and errors
TrackedObjectsadd, remove, each accepting one object or an arrayBatching, loading, and errors
LoadOption, LoadQueryOptionsExplicit property names; select, top, skip; reserved expandBatching, loading, and errors
DocxEditorError, DocxEditorErrorInit, DocxEditorErrorCode, isDocxEditorErrorStable error codes, target, resource limit, and revision metadataBatching, loading, and errors

Document and text objects

Every model object inherits the common ClientObject members. Each collection also exposes loaded, read-only items.

ObjectPublic members beyond inherited membersGuide
DocumentremoveDocumentInformation, properties, body, paragraphs, sections, contentControls, comments, revisions, footnotes, endnotes, changeTrackingModeText and ranges, Page layout and stories, Tracked changes
RemoveDocInfoTypeAll standard enum values; only documentProperties removal is supportedRemove document properties
DocumentPropertiesauthor, title, subject, keywords, comments, category, read-only lastAuthorDocument properties
Bodytext, footnotes, endnotes, paragraphs, getRange, search, clear, insertText, insertParagraph; font, style, lists, bookmarks, contentControls, getComments, revisions, tables, inlinePictures, shapes, fieldsText and ranges, Page layout and stories
Paragraphtext, uniqueLocalId, getRange, insertText, insertParagraph, split, clear, delete; font, style, paragraph formatting; list, listItem, startNewList, attachToList, detachFromList; shapesText and ranges, Formatting and styles, Lists and numbering
Rangetext, paragraphs, search, insertText, insertParagraph, clear, delete, select; font, style, hyperlink, bookmarks, tables, inlinePictures, fields; insertTable, insertInlinePictureFromBase64, insertField, insertBreak, insertContentControl, insertCommentText and ranges and the dedicated insertion guides
ParagraphCollectiongetFirst, getLast, getFirstOrNullObject, getLastOrNullObjectSearch and navigation
RangeCollectiongetFirst, getLast, getFirstOrNullObjectSearch and navigation
Bookmark, BookmarkCollectionBookmark name, range, select; collection itemsSearch and navigation
SearchOptions, SelectionModePlain-text search flags and browser selection locationsSearch and navigation
InsertLocation, BesideLocation, BodyInsertParagraphLocation, BodyInsertTextLocation, ParagraphInsertTextLocation, RangeInsertTextLocationInsertion location enums and aliasesText and ranges

Formatting, lists, tables, and pictures

Font writes honor inherited complex-script properties. Font reads return authored values or null; they do not resolve inherited formatting.

Object or typePublic members beyond inherited membersGuide
Fontbold, italic, color, name, size, underline, strikeThrough, highlightColor, subscript, superscriptFormatting and styles
Paragraph formattingalignment, firstLineIndent, leftIndent, rightIndent, lineSpacing, spaceBefore, spaceAfterFormatting and styles, including right-to-left alignment
UnderlineType, Alignment, ParagraphAlignmentFont underline and paragraph alignment valuesFormatting and styles
Listid, paragraphs, getLevelParagraphs, insertParagraph, setLevelBullet, setLevelNumbering, setLevelStartingNumber, setLevelIndentsLists and numbering
ListCollection, ListItemCollection getFirst, getById; item levelLists and numbering
ListBullet, ListNumberingBullet and number marker valuesLists and numbering
Tablevalues, style, headerRowCount, rowCount, columnCount, rows, getCell, addRows, addColumns, deleteRows, deleteColumns, deleteTables and cells
TableRow, TableCellRow cells, insertRows; cell body, value, columnWidth, shadingColor, verticalAlignmentTables and cells
TableCollection, TableRowCollection, TableCellCollectiongetFirst, getFirstOrNullObjectTables and cells
VerticalAlignmentCell alignment valuesTables and cells
InlinePicturewidth, height, lockAspectRatio, altTextDescription, deleteInline pictures
InlinePictureCollectiongetFirst, getLast, getFirstOrNullObject, getLastOrNullObjectInline pictures
Shape, ShapeCollection, ShapeTypeShape id, name, type, body; collection getFirst, getFirstOrNullObject, getByTypes; shape type valuesPage layout and stories

Fields, stories, and controls

Range.insertContentControl() creates RichText, PlainText, and DatePicker controls.

Object or typePublic members beyond inherited membersGuide
Field, FieldCollectionField code, updateResult, delete; collection getFirst, getLast, getFirstOrNullObject, getLastOrNullObjectFields and pagination
FieldType, FieldTypeLiteralOffice.js-compatible field vocabulary; authoring supports PAGE, NUMPAGES, and the documented inert TOC subsetFields and pagination
Section, SectionCollectionSection body, pageSetup, getHeader, getFooter, getNext; collection getFirstPage layout and stories
PageSetuppageWidth, pageHeight, orientation, topMargin, bottomMargin, leftMargin, rightMarginPage layout and stories
HeaderFooterType, PageOrientation, BreakTypeStory variants, orientation, and break vocabularyPage layout and stories
NoteItem, NoteItemCollection, NoteItemTypeNote type, text, body, delete, getNext; collection getFirst; note kind valuesPage layout and stories
ContentControlid, tag, title, subtype, isBound, cannotDelete, cannotEdit, placeholderShown, temporary, text, paragraphs, contentControls, getRange, setValue, insertText, deleteContent controls
ContentControlCollectiongetFirst, getFirstOrNullObject, getById, getByTag, getByTitleContent controls
ContentControlType, ContentControlSubtype, ContentControlValue, ContentControlLockStateCreation vocabulary, DOCX subtype terms, typed values, and lock vocabularyContent controls

Comments and revisions

Document.changeTrackingMode = 'TrackMineOnly' tracks supported text, font, paragraph, list, table, and content control edits. Column changes require an eligible complete proposed table. Page setup refuses while tracking. For supported operations and collaboration limits, see Tracked changes.

Object or typePublic members beyond inherited membersGuide
CommentauthorName, creationDate, id, text, delete, resolved, replies, getRange, replyComments
CommentReplyauthorName, creationDate, id, text, deleteComments
CommentCollection, CommentReplyCollectiongetFirstComments
Revisionauthor, date, type, range, accept, rejectTracked changes
RevisionCollectionresolve, acceptAll, rejectAllTracked changes
ChangeTrackingMode, RevisionTextView, RevisionTypeRuntime tracking modes, read views, and published revision typesTracked changes

Distinguish host extensions from Office.js compatibility

Host factories, runtime capabilities, input budgets, and collaboration setup are DocxEditor infrastructure. They do not represent Microsoft Office add-in APIs. Body-scoped bookmarks and revisions, document notes, typed control values, and nullable review dates include documented differences.

External document refresh

The refresh controller belongs to the browser host, outside the Office.js document model. RefreshHighlightOptions controls change selection and decoration. NavigateToChangeOptions controls scroll alignment, motion, padding, and focus. For more information, see Document refresh API.

RefreshChangeInput.description supplies a processor review summary. RefreshChange.diagnostic reports unavailable locations with stable codes and the requested anchor. Refresh resets selection and undo history. It refuses collaborative sessions.

Document properties

Document.properties returns a DocumentProperties proxy. It exposes the string properties author, title, subject, keywords, comments, and category. Load each property before reading it. Assignments commit at context.sync(). Missing properties read as empty strings. An empty assignment clears that value.

Writes preserve unrelated document properties. Values must contain XML-safe text with at most 4096 UTF-16 code units. TrackMineOnly refuses these writes with NotSupported. Individual dates and custom properties are unsupported. lastAuthor reads cp:lastModifiedBy and has no setter.

await runtime.run(async (context) => {
  const properties = context.document.properties;
  properties.author = 'Public Records Office';
  properties.title = 'Release packet';
  properties.subject = 'Public information';
  properties.keywords = '';
  properties.comments = '';
  await context.sync();
});

Collaborative writes require an existing core-properties part. If the input omits this part, set properties before joining collaboration. Concurrent creation of this package part cannot merge safely.

Remove document properties

Call document.removeDocumentInformation('DocumentProperties') to remove standard core, extended, and custom property parts. Keep this command as the only write in its sync. This also removes last-author information and property relationships. It preserves document content, comments, revisions, and media.

Ambiguous parts, incorrect roots or types, and unknown dependencies refuse with NotSupported. The method refuses all other RemoveDocInfoType modes, tracked writes, and collaboration. This subset does not anonymize text, cached field results, images, or review authors.

await runtime.run(async (context) => {
  context.document.removeDocumentInformation('DocumentProperties');
  await context.sync();
});

Next steps

See Office.js compatibility before migrating Office.js code. The generated reference remains the declaration authority; runtime notes and tests establish supported behavior.

For integration patterns, see Connect an agent to a document.