Are the command codes for ExecuteMso documented?

烂漫一生 提交于 2019-12-02 10:29:25

问题


MS Office apps have an incredible API that lets one execute any command that is accessible from the UI, but inaccessible from the Object Model. Specifically, you can use ExecuteMso() to execute any command button, toggle button or split button. The docs say:

expression.GetEnabledMso(idMso)

idMso - Identifier for the control (String)

Are the string command codes documented anywhere? Office apps have thousands of unique commands that can be viewed in the Options dialog, and it would be nice to have a reference of the string codes for all of these.


回答1:


There are these:

  • Office 2007: Lists of Control IDs

  • Office 2010: Office Fluent User Interface Control Identifiers

  • Office 2013: Office Fluent User Interface Control Identifiers

And see further http://www.rondebruin.nl/win/s2/win003.htm




回答2:


You can get the ID from the options dialog shown in the question. Hover above any item and find the ID in the tooltip:



来源:https://stackoverflow.com/questions/25610998/are-the-command-codes-for-executemso-documented

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!