Question

I need to know if MS Office 2013 installed on user machine to use specific way of opening office documents for editing from website.

Maybe there are some plugins/activex specific for Office 2013?

I tried to find out how Sharepoint does this task but it is too tricky:

this.IsProtocolHandlerEnabled = function(d) {
        if (IsStrNullOrEmpty(d))
            return false;
        if (b[d] != null)
            return b[d];
        if (c)
            return a;
        ...

'a' equals 'true' if office 2013 is available and 'false' otherwise but I can not find the place where variable 'a' was changed.

Was it helpful?

Solution

this method worked for me in chrome, you may have to dumb-down the iteration for older copies of IE:

var has2013=([].slice.call(navigator.plugins)
    .filter(function(a){return a.name.match("Microsoft Office")})[0].name||"")
    .match(2013)||false;

alert(has2013);
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top