Customizing the PowerPoint Ribbon at Run-Time
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am developing a PowerPoint add-in and would like to temporarily disable some of the Ribbon controls while the add-in application is running . I have developed a solution that works as expected when the Add-In is enabled , but this is not really adequate, because it disables some commonly used controls, like SlideMaster, SlideSorter, etc. I am using PowerPoint 2010. Here is a sample XML which is well-formed: Here is a sample callback, taken from this SO answer : Sub GetVisible(control As IRibbonControl, ByRef returnedVal As Boolean) If