Home > Software design >  OfficeJS API - Get version of the add-in installed in client machine
OfficeJS API - Get version of the add-in installed in client machine

Time:11-01

I am developing an add-in for Word, Excel and PowerPoint. I need to fetch the version of the add-in installed in client machine. I can see the version under 'Security Info' but I need to get it in my script at runtime.

Is there any OfficeJS API to fetch add-in version or get 'Security Info' programmatically ?

CodePudding user response:

Have a look at this question. There isn't currently an API to get the version of the add-in from the add-in manifest.

If this solution described doesn't meet your needs, please head over to Microsoft 365 Developer Platform and post a request for the API team to consider. It will be helpful, if you provide more details on why getting the version information from the manifest is valuable for your use case.

CodePudding user response:

The Office JavaScript API (OfficeJS) doesn't provide anything for that. Typically the version of Office add-ins is specified in the add-in manifest file where you don't access until it is hosted with a web app. If it is uploaded to the same place/server with your web app and you know the exact URL you may try to fetch the content and read the version from there. Otherwise, you have to define the version in the JS files or pass it as an URL parameter like Michael described.

If you find it inconvenient (as I do) you can post or vote for an existing feature request on Tech Community where they are considered when the Office dev team go through the planning process.

  • Related