OfficeDev / office-js

A repo and NPM package for Office.js, corresponding to a copy of what gets published to the official "evergreen" Office.js CDN, at https://appsforoffice.microsoft.com/lib/1/hosted/office.js.
https://learn.microsoft.com/javascript/api/overview
Other
654 stars 93 forks source link

Enable and Disable Add-in Commands for Word Add-in #4612

Open ishanig11 opened 6 days ago

ishanig11 commented 6 days ago
False setting works fine for Word Desktop but not for online Word. Can you please tell me how to make it work for Online Word also?
shanshanzheng-dev commented 5 days ago

Hi @ishanig11 you can leverage this reference: https://learn.microsoft.com/en-us/office/dev/add-ins/design/disable-add-in-commands

ishanig11 commented 5 days ago

I am using references from same URL. It worked for all applications except Word online.

shanshanzheng-dev commented 5 days ago

Hi @ishanig11 could you share your the whole code, we'll try to repro your issue. Thanks.

ishanig11 commented 5 days ago

Desktop Word image : command is disabled image

Online Word image: command is not disabled image

Used same manifest file at both places. You can refer Enabled tag under manifest file. manifest.zip

shanshanzheng-dev commented 5 days ago

Thanks for providing this information, we'll take a look and will report back if we have a suggestion for you. Thanks.