简体   繁体   English

如何在Outlook中的文件类型中添加菜单项

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

I'm trying to create a Export method of a VCF file to our CRM application. 我正在尝试创建 VCF文件 的Export方法到我们的CRM应用程序。

I'm running the new VS 2010 but target the project as .NET 3.5 我正在运行新的VS 2010,但该项目的目标是.NET 3.5

what is the technique to hook up into this context menu ? 连接到此上下文菜单的技术是什么?

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

I'm very new to AddIns but as a logical line of thought is to create an Outlook AddIn, but I'm failing miserably to add a menu item to this context menu :( 我对AddIns很陌生,但逻辑上是创建一个Outlook AddIn,但不幸的是我未能为该上下文菜单添加菜单项:(

Thank you for any help on this 谢谢你的帮助

Got it 得到它了

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

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

and then in the eventHandler 然后在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