Invoke built-in ribbon commands from Javascript
We are able to invoke a built-in Ribbon command in VBA by using:
Application.CommandBars.ExecuteMso(“Copy”)
Could we have a way to invoke built-in functionality from Javascript

Thank you for the feedback! We’ve added this to our backlog and we’ll keep you posted with status updates.
Thanks!
Office Extensibility Team
2 comments
-
Dan Moorehead commented
Office Extensibility Team,
Can you please provide any kind of idea of when or whether this might be implemented (as it's been in the backlog for nearly 2 years)?
Is this something you might be able to move up in the backlog as a higher priority so likely to be addressed?Support for executing commands / automating UI would be extremely helpful in helping to bridge the gap between what is possible with JavaScript / Office.js vs. VBA / Automation APIs, and provide a lot of functionality even with just one new method like:
Application.executeUICommand(command: string | UICommand)
Ideally you could provide an enum like UICommand with string values auto-generated from list of known/most common commands, like from either:
● https://docs.microsoft.com/en-us/openspecs/office_standards/ms-customui/bb5bb594-ec8c-45f6-8424-f98e8308b25a
● https://docs.microsoft.com/eu-es/office/vba/office-mac/idmsoexcelmac
However, simply executeUICommand(commandName: string) without any enum (for first version, if that simplifies and therefore helps to get this implemented sooner), and even if just for Excel at first, would be of immense value to those looking to move from VBA to JavaScript for Office Add-in development and automation.Thanks,
Dan--
Dan Moorehead
Co-Founder & CTO
PowerSheet.ai for Excel | http://PowerSheet.ai
● AI Powered Excel ● Smart Tables ● Easy BI
● Auto Forms, Reports, Pivot & Finance
● Excel Content Add-in & Online -
Anonymous commented
This relates to "add-in commands"