Skip to content Skip to sidebar Skip to footer

Is It Possible To Using Custom Properties (javascript Api 1.3 For Office)

I saw the MS Office js api 1.3 document about custom properties. But I can not read any custom property item from word settings by office js. `Word.run(function (context) {

Solution 1:

CallOfDuty: I think what's happening is that you don't have an updated version of your Office Client (you need 16/0.7766+). I ran your code in a recent build and I am getting the custom properties using your exact same code. So just please make sure you are working on a fresh update, here are some instructions on how to do it.

Btw, I just got a simplified version of your code. Hope this helps!

functiongetProperties() { 
    Word.run(function (context) {
        var customDocProps = context.document.properties.customProperties;
        context.load(customDocProps);
        return context.sync()
            .then(function () {
                console.log(customDocProps.items.length);
             })
     })
}

Post a Comment for "Is It Possible To Using Custom Properties (javascript Api 1.3 For Office)"