Closed shekar233 closed 1 month ago
Thank you for letting us know about this issue. We will take a look shortly. Thanks.
I have the same issue with Contextual Menu Items
I'm trying to find who to assign this to.
Hello, enable/disable is not supported on the right click context menu at the moment.
Is this issue is FIxed ?
Also experiencing this issue. Can you please recommend a workaround?
I have the same issue with context menu button/items.
Hi @NataliaKravcheniaTR . @rgold5950 , and @Shukla-Dev - Currently you can only enable/disable ribbon buttons and not sub menu items. This would be a new feature. Please make a feature request here Microsoft 365 Developer Platform Ideas Forum. Please add your request there. Feature requests on are considered when we go through our planning process. Thanks for highlighting this!
@EsterBergen Could you update the documentation that this functionality is only available in ribbon? https://learn.microsoft.com/en-us/office/dev/add-ins/design/disable-add-in-commands
Great point. @samantharamon Can you have a look?
Thanks for the suggestion, @NataliaKravcheniaTR. Changes to the article have been merged (see PR#4838). These updates will be published by the end of today.
Enable/Disable Multiple Contextual Menu Items on right click
Provide required information needed to triage your issue
Your Environment
Expected behavior
I want to enable/disable the Sub-Menu Items based on the worksheet or a specific cell within a sheet. i.e. Right Click --> Contextual Menu --> Sub-Menu1 --> Sub-Menu2
I want to Enable/Disable the Sub-Menu1 or Sub-Menu 2 based on which worksheet the user is working on or based on a particular cell/cell range the user right clicks on.
Current behavior
Current office documentation doesn't mention anything on how contextual menus can be enabled/disabled.
The Office.ribbon.requestUpdate(input: RibbonUpdaterData) supports only disabling/enabling the buttons on the ribbon of a Contextual Tab.
Steps to reproduce
Add the ExtenstionPoint tag with type as ContextMenu in the manifest file, and the following code ore similar.
Link to live example(s)
Provide additional details
When the above code is executed I get the following error
Context
I want to enable/disable these submenus based on different business requirements i.e. based on worksheet or based on cell or cell range etc. As shown in the attached image, I want to enable/disable Sub-Menu 1 or Sub-Menu 2 based on the active worksheet or active cell.
A better explanation of my requirement is posted in the following stackoverfow link. Enable/Disable Contextual Sub Menu Items
Useful logs
Thank you for taking the time to report an issue. Our triage team will respond to you in less than 72 hours. Normally, response time is <10 hours Monday through Friday. We do not triage on weekends.