Closed Murugananths closed 4 years ago
Hi. Sample examples will be helpful for real time implementation. Thanks.
Hi Team,
We were able to disable custom ribbon command initial load but not sure how to enable the same based on click event of other ribbon command event. Gone through below article also but not understanding where to call the method enableButton(). Can you please provide simple examples for one event with manifest configuration.
function enableButton() { Office.ribbon.requestUpdate({ tabs: [ { id: "OfficeAppTab1", controls: [ { id: "MyButton", enabled: true } ]} ]}); }
Hi team, Any update please?
Hi team, Any update please? We are in middle of developing this feature hence reply will be helpful to proceed further.
Hi Team,
We are getting below runtime issue when trying to enable ribbon command with below code tried in page load..
Tried code: Office.ribbon.requestUpdate({ tabs: [ { id: "OfficeAppTab1", controls: [ { id: "MyButton", enabled: true } ]} ]}); Issue : RichApi.Error: The API you are trying to use is not available. It may be available in a different scenario.
Hi Team,
Have you had chance to look into this.?
Tried below sample with configuration in Manifest and getting below exception. Kindly suggest.
WORD AROUND TRIED: Office.onReady(async () => { enableButton(); });
const enableButton = async () => { var button = {id: "Menu", enabled: true}; var parentTab = {id: "Tab1", controls: [button]}; var ribbonUpdater = { tabs: [parentTab]}; await Office.ribbon.requestUpdate(ribbonUpdater); }
ISSUE :
1) Uncaught (in promise) RichApi.Error: The API you are trying to use is not available. It may be available in a different scenario. at new c (https://appsforoffice.microsoft.com/lib/1.1/hosted/excel-web-16.00.js:24:293355) at c.f.processRequestExecutorResponseMessage (https://appsforoffice.microsoft.com/lib/1.1/hosted/excel-web-16.00.js:24:354008) at https://appsforoffice.microsoft.com/lib/1.1/hosted/excel-web-16.00.js:24:352113
2) taskpane.js:14734 Uncaught (in promise) RichApi.Error: The API you are trying to use is not available. It may be available in a different scenario. at new c (https://appsforoffice.microsoft.com/lib/beta/hosted/excel-web-16.00.js:24:293355) at c.f.processRequestExecutorResponseMessage (https://appsforoffice.microsoft.com/lib/beta/hosted/excel-web-16.00.js:24:354008) at https://appsforoffice.microsoft.com/lib/beta/hosted/excel-web-16.00.js:24:352113
This issue is being tracked with a Stack Overflow question which is where it belongs for now. So, I'm closing this issue.
Hello
I'm facing this issue can anyone help me
Hi Team, For disabling the custom ribbon commands tried below things as per the below article but still not achieving the feature. Hence kindly confirm is there any steps missing or any need to wait for stabled release since these are in preview it seems...
In Manifest: Added Enabled to false below Action tab as per document.
note : It is implemented and tested in Office Online Excel... Article Referred: https://docs.microsoft.com/en-us/office/dev/add-ins/design/disable-add-in-commands