2

Is it possible to use the preview API in a offline environment? I means, something like to reference locally the library.

Thank you for your time.

Best regards

1 Answer 1

2

Yes, it is possible if you download the latest office.js version locally. To use preview APIs:

  • You must reference the beta library on the CDN (https://appsforoffice.microsoft.com/lib/beta/hosted/office.js). The type definition file for TypeScript compilation and IntelliSense is found at the CDN and DefinitelyTyped. You can install these types with npm install --save-dev @types/office-js-preview.
  • You may need to join the Office Insider program for access to more recent Office builds.

Read more about that in that in the Word JavaScript preview APIs article.

Sign up to request clarification or add additional context in comments.

2 Comments

While technically true, OfficeJS Add-ins are designed to run online as they are basically websites running in the TaskPane (The manifest file provides the host, Word in this case, where to find the web page). To run offline you should have some sort of a PWA implementing an offline scenario or run a 'server' on your local machine hosting the Web App.
@MaartenvanStam I am aware of that. BTW Glad to see you at SO!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.