0

How can I programmatically put a reference to the custom ribbon I made so that the custom region I created will appear in that ribbon?

I see this is how you reference an outlook item. But I dont know how if its a customized ribbon.

 private void MapItFactory_FormRegionInitializing(object sender, Microsoft.Office.Tools.Outlook.FormRegionInitializingEventArgs e)
        {
            Outlook.ContactItem myItem = (Outlook.ContactItem)e.OutlookItem;
EJ Camp
  • 1
  • 6
  • What particular ribbon interface do you need to reference? What exactly are you trying to do? – Dmitry Streblechenko Jun 01 '18 at 15:51
  • I am actually new in developing add-ins so my terms aren't that accurate. I want my programmatically created button that opens a map when click to appear in the Tab I made using the user interface of the outlook. – EJ Camp Jun 01 '18 at 16:25

1 Answers1

0

Do not use a form region - use a task pane. Since you are the one creating the task pane, you will have a reference to it (associated with a particular inspector). This way your button click event code can access your task pane.

Dmitry Streblechenko
  • 62,942
  • 4
  • 53
  • 78
  • I found that this is where you can initialize on where the button will appear. The button appeared in the Task Form. `[Microsoft.Office.Tools.Outlook.FormRegionMessageClass(Microsoft.Office.Tools.Outlook.FormRegionMessageClassAttribute.Task)]` but I will still try to use task pane – EJ Camp Jun 01 '18 at 17:15