简体   繁体   English

从 VBA 实现 IRibbonExtensibility_GetCustomUI

[英]Implementing IRibbonExtensibility_GetCustomUI from VBA

I've been trying to manipulate Outlook Ribbon, namely QAT icons, from VBA editor.我一直在尝试从 VBA 编辑器操作 Outlook 功能区,即 QAT 图标。 Found references to IRibbonExtensibility, which is actually recognized in class modules:找到对 IRibbonExtensibility 的引用,它实际上在类模块中被识别:

Implements IRibbonExtensibility

Public Function IRibbonExtensibility_GetCustomUI(ByVal RibbonID As String) As String
    'Must return XML
End Function

However, I can't get this interface instantiated:但是,我无法实例化此接口:

Adding this code in ThisOutlookSession cause Outlook startup error.ThisOutlookSession添加此代码会导致 Outlook 启动错误。

Instantiating class modules with this code render IRibbonExtensability member as Nothing.使用此代码实例化类模块会将 IRibbonExtensability 成员呈现为 Nothing。

Is this only available for COM Addins?这仅适用于 COM 插件吗? Any other direction?还有别的方向吗?

Yes, in case of Outlook the Fluent UI customizations are available through COM add-ins only.是的,对于 Outlook,Fluent UI 自定义仅可通过 COM 加载项获得。

Read more about the Fluent UI (aka Ribbon UI) in the following series of articles:在以下系列文章中阅读有关 Fluent UI(又名 Ribbon UI)的更多信息:

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM