You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The JavaScript API for Office includes objects, methods, properties, events, and enumerations that you can use in your Office Add-ins code.
4
-
5
-
Learn more about [supported hosts and other requirements](../docs/overview/requirements-for-running-office-add-ins.md).
6
-
7
-
The **Microsoft.Office.WebExtension** namespace (which by default is referenced using the alias [Office](../reference/shared/office.md) in code) contains objects you can use to write script that interacts with content in Office documents, worksheets, presentations, mail items, and projects from your Office Add-ins.
The JavaScript API for Office enables you to create web applications that interact with the object models in Office host applications. Your application will reference the office.js library which is a script loader. office.js loads the object models that are applicable to the Office application that is running the add-in. There are two potential JavaScript object object model forms you may use:
54
5
6
+
1) Common - APIs that were introduced with Office 2013. This is loaded for **all Office host applications** and must be used as it connects your add-in application with the Office client application. The object model contains APIs that are specific to Office clients, and many APIs that are applicable to many Office client host applications. All of the content under [shared](../reference/shared/shared-api.md) and **outlook** are considered the common APIs. The **Microsoft.Office.WebExtension** namespace (which by default is referenced using the alias [Office](../reference/shared/office.md) in code) contains objects you can use to write script that interacts with content in Office documents, worksheets, presentations, mail items, and projects from your Office Add-ins. You must use these common APIs if your add-in will target Office 2013 and later. This object model form uses callbacks.
55
7
56
-
## Enumerations
8
+
2) Host specific - APIs that were introduced with Office 2016. The new object model that provides host specific strongly-typed objects that correspond to familiar objects that you see when you use Office clients. This is the future of Office JavaScript APIs and should be used moving forward. This is currently applicable to [Word](../reference/word/word-add-ins-javascript-reference.md) and **Excel**. This object model form uses promises.
|[Enumerations](../reference/shared/enumerations.md)|See child enumeration topics for details.|See Requirements in enumeration topic for details.|
61
-
62
-
## View APIs by add-in type support
63
-
64
-
To view the JavaScript API for Office organized by the subsets of the API that support each add-in type, see
65
-
66
-
|**API **|**Description**|
67
-
|:-----|:-----|
68
-
|[Shared API](../reference/shared/shared-api.md)|The subset of the API that you can use in all three types of Office Add-ins: content, task pane, and Outlook add-ins.|
69
-
|[Document API](../reference/shared/document-api.md)|The subset of the API that you can use in the two types of Office Add-ins associated with documents: content and task pane add-ins.|
70
-
|[Mailbox API](../reference/outlook/index.md)|The subset of the API that you can use in Outlook add-ins.|
10
+
Select the Office client from the dropdown above the TOC to filter the content based on your target host application.
71
11
72
12
## Supported host applications
73
13
* Access
@@ -76,3 +16,5 @@ To view the JavaScript API for Office organized by the subsets of the API that s
76
16
* PowerPoint
77
17
* Project
78
18
* Word
19
+
20
+
Learn more about [supported hosts and other requirements](../docs/overview/requirements-for-running-office-add-ins.md).
0 commit comments