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) {
// Create a proxy object for the document.
var thisDocument = context.document;
var customProperties = thisDocument.properties.customProperties;
context.load(customProperties);
return context.sync().then(function () {
var getcount = customProperties.getCount();
console.log(customProperties.items);
return context.sync().then(function () {
console.log(getcount.value);
});
});
})`
The customProperties.items alway return empty array. I also can not find the set
method in customProperties
My custom property is show in this (https://i.stack.imgur.com/AywDo.png).
Does MS Office js api not support to access custom properties in word yet?
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!