Search code examples
office-js

How to get office app version value using office.js


Office app version can be mentioned in manifest file such as following

<OfficeApp > 
  <Version>1.0.0.8</Version>
<OfficeApp >

is there way to get app version value through office.js


Solution

  • There is not, though I'd be curious to learn the scenario for where you need it. Note that your manifest version will often rev slower than your web content (that is, you might very well update your website quite often to address bugs and add new features, whereas you only need to touch the manifest if you change the start page, the Requirements set, or a few other metadata-level properties).

    If you do need to pipe through the manifest version, could you not just do it "manually" by putting a query string on the start page location?

    <DefaultSettings>
        <SourceLocation DefaultValue="https://yourserver/startpage.html?version=1_0_0_8"/>
    </DefaultSettings>
    

    Or having a different start pages for different versions, if you don't want to use query strings (and depending on what you're doing the differentiation for).

    Let me know if this approach doesn't work for you, for some reason...

    ~ Michael Zlatkovsky, developer on Office Extensibility team, MSFT