从我的外接程序调用第三方的Outlook外接程序键式 [英] Invoke 3rd party Outlook AddIn-Button from my AddIn

查看:1066
本文介绍了从我的外接程序调用第三方的Outlook外接程序键式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在找创建后市将调用来自其他第三方插件,当邮件项目被添加到一个特定的文件夹的连接和转发功能的插件,但我不知道怎么才能找到这个按钮来调用它。
所需的按钮(邮件时,选择左下角),但不是当邮件被打开(双击)收件箱屏幕上显示的是一个下拉菜单,这里的结构。突出显示的是所需的功能。







我怎么会调用这个函数为特定的邮件项目,我发现赎回图书馆似乎有用的,但不知道如何充分运用它。
在Outlook中调用功能区按钮2013



这是我迄今。看评论。 (从@Dmitry Streblechenko片段)

 私人无效ExecuteAttachAndForward()
{
Redemption.SafeInspector sInspector =新Redemption.SafeInspector();
sInspector.Item = Application.ActiveInspector()CURRENTITEM。
Redemption.SafeRibbon丝带= sInspector.Ribbon;
串oldActiveTab = Ribbon.ActiveTab;
Ribbon.ActiveTab =家; //这是标签的正确名称?
Redemption.SafeRibbonControl控制= Ribbon.Controls.Item(附加和转发);
//我怎么会进入PDF子功能的下拉?
Control.Execute();
Ribbon.ActiveTab = oldActiveTab; //恢复活动标签
}


解决方案

哈克方式:通过赎回调用丝带和使用的的SendKeys .SendWait({下} {} ENTER);



其实这似乎工作得很好。


I'm looking to create an AddIn for outlook which will invoke an Attach and Forward function from another 3rd party addIn when a mail item is added to a certain folder, however I'm not sure how to find this button in order to invoke it. the desired button is displayed on the inbox screen (when mail is selected bottom left) but not when a mail is opened (double click) is in a drop-down, here's the structure. Highlighted is the desired function.

How would I invoke this function for a specific mail item I found the Redemption Library which seems useful but not sure how fully to apply it. Invoke Ribbon button in Outlook 2013

This is what I have so far. See comments. (snippet from @Dmitry Streblechenko)

private void ExecuteAttachAndForward()
    {
    Redemption.SafeInspector sInspector = new Redemption.SafeInspector();
    sInspector.Item = Application.ActiveInspector().CurrentItem;
    Redemption.SafeRibbon Ribbon = sInspector.Ribbon;
    string oldActiveTab = Ribbon.ActiveTab;
    Ribbon.ActiveTab = "Home";   // is this the correct name of the tab?         
    Redemption.SafeRibbonControl Control = Ribbon.Controls.Item("Attach and Forward"); 
    // how would I access the pdf sub function in the dropdown?
    Control.Execute();
    Ribbon.ActiveTab = oldActiveTab; //restore the active tab                          
}

解决方案

A hacky way: Invoke the Ribbon via Redemption and use SendKeys.SendWait("{DOWN}{ENTER}");

Actually this seems to work pretty well.

这篇关于从我的外接程序调用第三方的Outlook外接程序键式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆