<script> tag within the
<head> section of your HTML page.
<head> section of the page to ensure that the API is fully initialized prior to any body elements.
API versioning and backward compatibility
In the previous HTML snippet, the
/1/ in front of
If you plan to publish your Office Add-in from AppSource, you must use this CDN reference. Local references are only appropriate for internal, development, and debugging scenarios.
Enabling IntelliSense for a TypeScript project
npm install --save-dev @types/office-js
Preview APIs are subject to change and are not intended for use in a production environment. We recommend that you try them out in test and development environments only. Do not use preview APIs in a production environment or within business-critical documents.
To use preview APIs:
npm install --save-dev @types/office-js-preview.
- You may need to join the Microsoft 365 Insider program for access to more recent Office builds.
CDN references for other Microsoft 365 environments
21Vianet operates and manages an Office 365 service powered by licensed Microsoft technologies to provide Office 365 services for China compliant with local laws and regulations. Add-ins developed for use within this cloud environment should use corresponding CDN. Use
https://appsforoffice.cdn.partner.office365.cn/appsforoffice/lib/1/hosted/office.js instead of the standard CDN reference. This ensures continued compliance and provides better add-in performance.