2010-04-14 79 views
0

我正在尝试为我们的CRM应用程序创建VCF文件的导出方法如何将菜单项添加到Outlook中的文件类型

我运行新的VS 2010,但针对该项目作为.NET 3.5

什么是技术挂钩到这个上下文菜单

alt text http://www.balexandre.com/temp/2010-04-14_1523.png

我很新的加载项,但作为思想的逻辑线是创建一个Outlook插件,但我没有草草收场一个菜单项添加到这个上下文菜单:(

谢谢你的任何帮助,在此

回答

1

得到它

alt text http://www.balexandre.com/temp/2010-04-14_1604.png

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

,然后在事件处理程序

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"; 
    } 
} 
相关问题