簡體   English   中英

如何在Outlook中的文件類型中添加菜單項

[英]How to add a menu item into a File Type in Outlook

我正在嘗試創建 VCF文件 的Export方法到我們的CRM應用程序。

我正在運行新的VS 2010,但該項目的目標是.NET 3.5

連接到此上下文菜單的技術是什么?

替代文字http://www.balexandre.com/temp/2010-04-14_1523.png

我對AddIns很陌生,但邏輯上是創建一個Outlook AddIn,但不幸的是我未能為該上下文菜單添加菜單項:(

謝謝你的幫助

得到它了

替代文字http://www.balexandre.com/temp/2010-04-14_1604.png

this.Application.AttachmentContextMenuDisplay += 
    new Outlook.ApplicationEvents_11_AttachmentContextMenuDisplayEventHandler(ThisAddIn_AttachmentContextMenuDisplay);

然后在eventHandler中

private void ThisAddIn_AttachmentContextMenuDisplay(Office.CommandBar commandBar, Outlook.AttachmentSelection attachments)
{
    if (attachments.Count > 0)
    {
        Office.CommandBarControl cbc = commandBar.Controls.Add(
                  Office.MsoControlType.msoControlButton, 
                  missing, missing, missing, true);

        cbc.Caption = "Export into SuperOffice";
        cbc.OnAction = "Action";
    }
}

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM