简体   繁体   English

将按钮添加到Outlook邮件功能区

[英]Add a button to Outlook message ribbon

I'm totally newbie in Office Add in Development. 我是Office Add in Development中的新手。 Started few hours ago :) 几小时前开始:)

Office version: 2016 Office版本:2016年

I would like to create an add-in, with a button that will allow me to synchronize my email with my custom program and "flag" it to avoid a new synchronization in the future. 我想创建一个带有按钮的加载项,使我可以将自己的电子邮件与自定义程序进行同步,并对其进行“标记”,以避免将来再次进行同步。 For that, it would be necessary to: 为此,有必要:

  • add a button (it seems simple to me, but by following this link , I did not manage to see the button when debugging in Outlook) 添加一个按钮(对我来说似乎很简单,但是通过单击此链接 ,我无法在Outlook中进行调试时看到该按钮)
  • I would like the button is present in the ribbon that appears when you open an email, and only down (it would prevent a synchronization of several emails at once) - and I can not find the name of the adequate control. 我希望该按钮出现在打开电子邮件时出现的功能区中,并且仅向下显示(它将阻止一次同步多个电子邮件)-我找不到适当控件的名称。 There is a list of Excel files ( here ) but which corresponds to the one of the opening of the mail message? 有一个Excel文件列表( 在此处 ),但是与打开邮件消息之一相对应?
  • perform any action when the user clicks the button - I guess that's a simple event of the button, but how can I get the opened message data and metadata (sender, to, cc, subject ...) 用户单击按钮时执行任何操作-我想这是按钮的简单事件,但是如何获取打开的消息数据和元数据(发件人,收件人,抄送,主题...)
  • "flag" the email, so as to avoid a second synchronization. “标记”电子邮件,以避免再次同步。 The ideal is to add an icon to the email in the list of emails, as is done for an email containing attachments etc ... 理想的做法是在电子邮件列表中的电子邮件中添加图标,就像对包含附件的电子邮件那样...

I know I'm asking a lot, but I'm not asking to get the job done, just to be able to steer in the right direction. 我知道我要求很多,但我并不是要完成工作,只是为了朝着正确的方向前进。 So if you have tutorials, articles etc ... to help me, it would be great. 因此,如果您有教程,文章等...对我有帮助,那就太好了。

Thank you 谢谢

NB: Copy of this question has been posted in VSTO forum here 注意:这个问题的副本已张贴在VSTO论坛在这里

To create a custom ribbon UI, VSTO provides two possible ways: 要创建自定义功能区UI,VSTO提供了两种可能的方法:

To keep a separate state for the control for each inspector window separately you need to implement ribbon callbacks and call the Invalidate or InvalidateControl methods of the IRibbonUI interface. 要为每个检查器窗口的控件分别保持单独的状态,您需要实现功能区回调并调用IRibbonUI接口的InvalidateInvalidateControl方法。 Read more about these methods in the following articles: 在以下文章中阅读有关这些方法的更多信息:

The Fluent UI (aka Ribbon UI) is described in depth: 流利的UI(又称功能区UI)进行了详细介绍:

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM