none
Adding to the Compose -> Message tab RRS feed

  • Question

  • I have my add-in showing for the "Message" tab using

    <tab idMso="TabNewMailMessage">

    in the Ribbon XML file and

    Public Function GetCustomUI(ByVal ribbonID As String) As String Implements Office.IRibbonExtensibility.GetCustomUI
            Select Case ribbonID
                Case "Microsoft.Outlook.Mail.Compose"
                    Return GetResourceText("MyAddin.MyRibbon.xml")
                Case Else
                    Return Nothing
            End Select
    End Function
    in the MyRibbon.vb, but this only shows when the compose window is popped out. When you click reply, Outlook automatically creates the reply message within the main explorer window, with this ComposeTools tab collection and TabMessage tab (I think?). I would like to add my add-in to this tab, but have tried adding it to Microsoft.Outlook.Explorer in the vb and the TabMessage tab in XML to no avail. Any help would be appreciated!

    Monday, July 18, 2016 1:01 PM

Answers

  • >>>If you could show me how to add a group to that Compose Tools>Message tab that would help me greatly.

    According to your description, I have made a smaple with Outlook 2013, please refer to below:

    Add Ribbon(XML) named RibbonNewMailMessage.xml 

    <?xml version="1.0" encoding="UTF-8"?>
    <customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui" onLoad="Ribbon_Load">
      <ribbon>
        <contextualTabs>
          <tabSet idMso="TabComposeTools">
            <tab idMso="TabMessage">
              <group id="MyGroup" label="My Group">
                <button id="btnInTabComposeTools" label="MineButton"/>
              </group>
            </tab>
          </tabSet>
        </contextualTabs>
      </ribbon>
    </customUI>

    Add code to RibbonNewMailMessage.cs:

    public string GetCustomUI(string ribbonID)
    {
        string customUI = string.Empty;
        //System.Windows.Forms.MessageBox.Show(ribbonID);
        // Return the appropriate XML markup for ribbonID.
        switch (ribbonID)
        {
                    
            case "Microsoft.Outlook.Explorer":
                customUI = GetResourceText(
                    "OutlookAddInTabNewMailMessage.RibbonNewMailMessage.xml");
                return customUI;
            default:
                return string.Empty;
        }
    }

    Add code to ThisAddIn.cs:

    protected override Office.IRibbonExtensibility CreateRibbonExtensibilityObject()
    {
          return new RibbonNewMailMessage();
    }

    Then you could get this result:



    In addition Office 2013 Help Files contains files for and information about each of the control IDs for built-in UI commands and menu items in all applications that use the Office 2013 Fluent UI.

    Download Office 2013 Help Files: Office Fluent User Interface Control Identifiers

    • Marked as answer by SizZiKe Wednesday, July 20, 2016 3:05 PM
    Wednesday, July 20, 2016 7:30 AM

All replies

  • >>>When you click reply, Outlook automatically creates the reply message within the main explorer window, with this ComposeTools tab collection and TabMessage tab (I think?).

    Yes, when you click reply, Outlook automatically creates the reply message within the main explorer window, with this ComposeTools tab collection and TabMessage tab.

    >>>I would like to add my add-in to this tab, but have tried adding it to Microsoft.Outlook.Explorer in the vb and the TabMessage tab in XML to no avail. Any help would be appreciated!

    Could you provide more information about this issue, for example screenshot and sample code etc., that will help us reproduce and resolve it.

    Thanks for your understanding.


    Tuesday, July 19, 2016 7:36 AM
  • Hi David, for some reason I can't activate my account on msdn so I cannot include pictures. 

    That exact tab is the one that I would like to include my add-in in, and I have it currently working for the "compose" pop-up window when you double click on a mail message and click reply. From there I added it to the "TabNewMailMessage," which is the message tab for that compose window. If you could show me how to add a group to that Compose Tools>Message tab that would help me greatly.

    Thanks

    Tuesday, July 19, 2016 1:44 PM
  • >>>If you could show me how to add a group to that Compose Tools>Message tab that would help me greatly.

    According to your description, I have made a smaple with Outlook 2013, please refer to below:

    Add Ribbon(XML) named RibbonNewMailMessage.xml 

    <?xml version="1.0" encoding="UTF-8"?>
    <customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui" onLoad="Ribbon_Load">
      <ribbon>
        <contextualTabs>
          <tabSet idMso="TabComposeTools">
            <tab idMso="TabMessage">
              <group id="MyGroup" label="My Group">
                <button id="btnInTabComposeTools" label="MineButton"/>
              </group>
            </tab>
          </tabSet>
        </contextualTabs>
      </ribbon>
    </customUI>

    Add code to RibbonNewMailMessage.cs:

    public string GetCustomUI(string ribbonID)
    {
        string customUI = string.Empty;
        //System.Windows.Forms.MessageBox.Show(ribbonID);
        // Return the appropriate XML markup for ribbonID.
        switch (ribbonID)
        {
                    
            case "Microsoft.Outlook.Explorer":
                customUI = GetResourceText(
                    "OutlookAddInTabNewMailMessage.RibbonNewMailMessage.xml");
                return customUI;
            default:
                return string.Empty;
        }
    }

    Add code to ThisAddIn.cs:

    protected override Office.IRibbonExtensibility CreateRibbonExtensibilityObject()
    {
          return new RibbonNewMailMessage();
    }

    Then you could get this result:



    In addition Office 2013 Help Files contains files for and information about each of the control IDs for built-in UI commands and menu items in all applications that use the Office 2013 Fluent UI.

    Download Office 2013 Help Files: Office Fluent User Interface Control Identifiers

    • Marked as answer by SizZiKe Wednesday, July 20, 2016 3:05 PM
    Wednesday, July 20, 2016 7:30 AM
  • Thanks David,

    I knew the component IDs but I didn't realize that I had to add the contextualTabs and tabSet groups to the XML.

    Wednesday, July 20, 2016 3:07 PM