I recently came across the MS Office JS API 1.3 documentation regarding custom properties, but I am facing difficulty in reading any custom property items from Word settings using 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 always return an empty array, and I cannot seem to find the set
method in customProperties
. My custom property is visible in this (https://i.sstatic.net/AywDo.png).
Is it possible that the MS Office JS API does not currently support accessing custom properties in Word?