![](/img/trans.png)
[英]Outlook Add-in Exception - How to check the type of Outlook.Item?
[英]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.