简体   繁体   中英

Add a button to Outlook message ribbon

I'm totally newbie in Office Add in Development. Started few hours ago :)

Office version: 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)
  • 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?
  • 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

To create a custom ribbon UI, VSTO provides two possible ways:

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. Read more about these methods in the following articles:

The Fluent UI (aka Ribbon UI) is described in depth:

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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