I know that the dynamic ribbon buttons or menus does not supported on Web Add in projects yet,and wonder if any improvements has been made about this . In fact, my main problem is : I'm trying to run my web Add in on a Dialog Box, not in the task pane but when I try to get custom properties of an Office Word document, I am able to do this from task pane but can't do the same on Dialog Box. When I try the code below I get a RichApi.Error:AccessDenied. I've checked the domains but could not find any problem. Any suggestions?`
async function readCustomDocumentProperties5() {
await Word.run(async (context) => {
let properties = context.document.properties.customProperties;
properties.load("key,type,value");
await context.sync();
for (var i = 0; i < properties.items.length; i++)
console.log(
"Property Name:" +
properties.items[i].key +
"; Type=" +
properties.items[i].type +
"; Property Value=" +
properties.items[i].value
);
});
}
The error:
Uncaught (in promise) RichApi.Error: AccessDenied
at new n (word-win32-16.01.js:26)
at n.i.processRequestExecutorResponseMessage (word-win32-16.01.js:26)
at word-win32-16.01.js:26
at async Dialog.html?_host_Info=Word$Win32$16.01$tr-TR$telemetry$isDialog$$0:47
at async readCustomDocumentProperties5 (Dialog.html?_host_Info=Word$Win32$16.01$tr-TR$telemetry$isDialog$$0:42)