【问题标题】:RequestComAddInAutomationService is not being called in VSTO Outlook addin在 VSTO Outlook 插件中未调用 RequestComAddInAutomationService
【发布时间】:2015-12-27 09:41:52
【问题描述】:

我有一个应用程序级别的 Outlook 2010 VSTO 插件并覆盖了 RequestComAddInAutomationService 函数。在两台开发 PC(一台装有 Outlook 2007,一台装有 Outlook 2010)上,我使用 Visual Studio 2012 测试了代码并调用了该函数。

Protected Overrides Function RequestComAddInAutomationService() As Object

    MsgBox("Request being Made")

    If dbShortCutCtrl Is Nothing Then
        dbShortCutCtrl = New DBShortCutKeyController
    End If

    Return dbShortCutCtrl
End Function

问题是当我部署插件时,这个函数没有被调用。插件功能符合预期,只是这个函数没有被调用。

VSTO 用 Outlook 启动时没有调用这个函数的原因是什么?

【问题讨论】:

    标签: outlook vsto outlook-addin


    【解决方案1】:

    事实证明,DBShortCutKeyController 类没有为 COM 正确注册,因此没有调用此函数。

    【讨论】:

      猜你喜欢
      • 2016-02-09
      • 2016-11-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-12-20
      • 2011-06-12
      • 2010-12-10
      • 2019-01-21
      相关资源
      最近更新 更多