【问题标题】:VSTO not working for Outlook 2013VSTO 不适用于 Outlook 2013
【发布时间】:2014-03-17 21:32:57
【问题描述】:

我有一个适用于 Outlook 2007 的 VSTO。它也适用于 Outlook 2010。现在我已经将我的办公室 2010 升级到 2013。我的 VSTO 也在这里工作。但问题是我编写了代码以在右键菜单中添加 ContextMenuItem。为了实现这一点,我实现了 Application.AttachmentContextMenuDisplay 方法。这是我的代码 sn-p:

 Private Sub Application_AttachmentContextMenuDisplay(ByVal CommandBar As    Microsoft.Office.Core.CommandBar, ByVal Attachments As Microsoft.Office.Interop.Outlook.AttachmentSelection) Handles Application.AttachmentContextMenuDisplay

     Dim DVCmdBarPopup As Office.CommandBarPopup
        DVCmdBarPopup = CommandBar.Controls.Add _
            (Office.MsoControlType.msoControlPopup, , , 3, True)

        With DVCmdBarPopup
            .Caption ="Menu"   
            .BeginGroup = True
            .Visible = True
            .Tag = "Hello World."
            .TooltipText = "Hello World."   
        End With

 End Sub

此代码适用于 Outlook 2007 和 2010。但是当我安装 Office 2013 并尝试构建我的 vsto 时,它会显示这样的错误。

"该项目目前包含对多个版本的 office 的引用,对版本 14.0.0.0 的直接引用和对版本的间接引用(通过'Microsoft.Office.Interop.Outlook._Explorer.CommandBars') 15.0.0.0." 我不知道会发生什么。如果您有任何想法或较早遇到此问题,请回复。 谢谢。

【问题讨论】:

    标签: c# .net vb.net vsto ms-office


    【解决方案1】:

    CommandBar.Controls.Add(Office.MsoControlType.msoControlPopup, , , 3, True) Outlook 2013 不支持。

    我也在尝试移植到 Outlook 2013,但它失败了。 “http://msdn.microsoft.com/en-us/library/office/jj229903.aspx”。

    如果你能从你的结果中弄清楚任何事情,请告诉我。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多