Word JavaScript API Hidden Document requirement set 1.4

The WordApiHiddenDocument 1.4 requirement set is a special requirement set that includes features that are only available for Word on Windows and on Mac. APIs in this requirement set are considered to be production APIs for the Word application on Windows and on Mac. They follow Microsoft 365 developer support policies. WordApiHiddenDocument APIs are considered to be "preview" APIs for other platforms (web, iPad) and may not be supported by any of those platforms.

Important

WordApiHiddenDocument 1.4 is a superset of the WordApi 1.4 and WordApiHiddenDocument 1.3 requirement sets, and is a desktop-only requirement set.

Because WordApiHiddenDocument APIs are only supported by Word on Windows and on Mac, your add-in should check if the requirement set is supported before calling these APIs. This avoids any attempt to use desktop-only APIs on an unsupported platform.

if (Office.context.requirements.isSetSupported("WordApiHiddenDocument", "1.4")) {
   // Any API exclusive to this desktop-only requirement set.
}

Once the API is in a cross-platform requirement set, you should remove or edit the isSetSupported check. This will enable your add-in's feature on other platforms. Be sure to test the feature on those platforms when making this change.

Important

Your manifest cannot specify WordApiHiddenDocument 1.4 as an activation requirement. It's not a valid value to use in the Set element.

API list

The following table lists the Word JavaScript APIs currently included in the WordApiHiddenDocument 1.4 requirement set. For a complete list of all Word JavaScript APIs (including WordApiHiddenDocument 1.4 APIs and previously released APIs), see all Word JavaScript APIs.

Class Fields Description
DocumentCreated customXmlParts Gets the custom XML parts in the document.
deleteBookmark(name: string) Deletes a bookmark, if it exists, from the document.
getBookmarkRange(name: string) Gets a bookmark's range.
getBookmarkRangeOrNullObject(name: string) Gets a bookmark's range.
settings Gets the add-in's settings in the document.

See also