1

I want the version of word on mac using the officejs API. I have tried with following code.

var initializationHelper = OSF._OfficeAppFactory.getInitializationHelper(); var hostInfo = initializationHelper._hostInfo;

But in hostInfo, hostInfo.hostSpecificFileVersion gives the officejs version as 16.00, and my mac word version is 15.24. So, please let me answer if anyone know how to get the mac word version using officejs API. Thanks in advance.

pooja
  • 159
  • 1
  • 13

1 Answers1

0

What do you need to know the version info for?

Generally speaking, the version is not exposed "by design". Instead, you can use Requirement Sets to ensure that the version of the host application supports the functionality that you need. See Neat ways to get environment (i.e. Office version) for a detailed answer.

On a related note: I highly hightly recommend NOT relying on any internal API, like the one you listed above. Those can change over time, breaking your application. As a best practice, only use APIs that are officially exposed (i.e., are documented and/or show up in the JavaScript or TypeScript IntelliSense).

Community
  • 1
  • 1