0

I have an Office add-in for Microsoft Word.

For providing support to users and also for debugging, it would be very helpful to know the precise version of Office being used by my users.

Does the Office.js API include a way to get the Office version being used? I did not see that in the API documentation.

new name
  • 15,861
  • 19
  • 68
  • 114
  • Word 2016, Word 2019, and Word 365 all use the same version number. Word or Office 16. The releases and builds are also the same. – Charles Kenyon May 25 '21 at 16:36

1 Answers1

2

You can use Office.context.diagnostics.platform property to identify the host platform. And you also will be interested in the Office.context.diagnostics.version property which returns the version.

Read more about other alternative ways on the Neat ways to get environment (i.e. Office version) thread.

Eugene Astafiev
  • 47,483
  • 3
  • 24
  • 45
  • Thanks Eugene, do you know if `Office.context.diagnostics` allows you to distinguish between subscription (Office 365) and purchased (Office 2019) versions? The comments by @Charles Kenyon above suggests that you can't. It is important for me to know this. – new name May 25 '21 at 17:43
  • You may try to use the `version` property to distinguish them. I guess they will have different build numbers. The list of versions and their builds is published and well-known. – Eugene Astafiev May 25 '21 at 20:45