Edit

Share via


Word JavaScript API desktop-only requirement set 1.5

The WordApiDesktop 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. WordApiDesktop APIs are considered to be "preview" APIs for other platforms (for example, web) and may not be supported by any of those platforms.

When APIs in the WordApiDesktop requirement set are supported across all platforms, they'll be added to the next released requirement set (WordApi 1.[NEXT]). Once that new requirement set is public, those APIs will also continue to be tagged in this WordApiDesktop requirement set. To learn more about platform-specific requirements in general, see Understanding platform-specific requirement sets.

Important

WordApiDesktop 1.5 is a desktop-only requirement set. It's a superset of WordApiDesktop 1.4.

Because the WordApiDesktop 1.5 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("WordApiDesktop", "1.5")) {
   // Any API exclusive to this WordApiDesktop 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 WordApiDesktop 1.5 as an activation requirement. It isn't a valid value to use in the Set element.

API list

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

Class Fields Description
ListTemplateAddOptions name If provided, specifies the name of the list template to be added.
outlineNumbered If provided, specifies whether to apply outline numbering to the new list template.
ListTemplateCollection add(options?: Word.ListTemplateAddOptions) Adds a new ListTemplate object.

See also