none
Adding a new custom group to an existing custom tab in Outlook Explorer RRS feed

  • Question

  • In IRibbonExtensibility.GetCustomUI(), for the RibbonID "Microsoft.Outlook.Explorer", I am returning the following xml:

    sRibbonXML = "<customUI xmlns=""http://schemas.microsoft.com/office/2009/07/customui"" onLoad=""ERibbon_OnLoad"" >" & _
          "<ribbon>" & _
                "<tabs>"& _
                     "<tab id=""tbMyCustomTab"" label=""My Custom Tab"" visible=""true"">" & _
                        "<group id=""cgMyCustomGroup"" label=""My Custom Group"">" & _
                               "<button ... >" & _
    		"</group>" & _
                    "</tab>" & _
                "</tabs>" & _
           "</ribbon>" & _
        "</customUI>"

    There is already an existing custom tab on the Explorer with the same tab ID, but when I ran my addin, it creates another custom tab instead of using the same existing one. What am I doing wrong?

    Thank you.
    Anand


    Anand Kumar

    Monday, September 17, 2012 3:55 AM

Answers

  • Hello Ken,

    Thank you for asking the right questions. I was creating a new custom tab rather than sharing an existing one. I did further googling on sharing Custom Tabs and using the xmlns and got the solution.

    For other viewers, information on sharing the same namespace and calling the same idQ attribute which lets your addins to share a custom tab are at: http://xldennis.wordpress.com/2009/03/11/sharing-custom-tabs-in-the-ribbon-ui/ (although its for Excel ribbon, you still get the idea how to use the xmlns)

    Thanks,
    Anand


    Anand Kumar

    • Marked as answer by a3kumarz Tuesday, September 18, 2012 12:13 AM
    Tuesday, September 18, 2012 12:13 AM

All replies

  • Explain what you're trying to do. Are you trying to add your UI to the existing tab or add a new tab?
     
    There is no tab with the id or label you are adding, unless some code added it. Is that your tab or something else?
     
    The only way to share custom tabs with ribbon XML is for both addins to use the same custom xmlns when creating the ribbon customization. If you have access to the namespace used you can share it, if not you'll have to forget it.

    --
    Ken Slovak
    [MVP-Outlook]
    http://www.slovaktech.com
    Author: Professional Programming Outlook 2007
    "a3kumarz" <=?utf-8?B?YTNrdW1hcno=?=> wrote in message news:1eebb0e5-b589-49dc-a2ef-73f0b66cb84a...

    In IRibbonExtensibility.GetCustomUI(), for the RibbonID "Microsoft.Outlook.Explorer", I am returning the following xml:

    sRibbonXML = "<customUI xmlns=""http://schemas.microsoft.com/office/2009/07/customui"" onLoad=""ERibbon_OnLoad"" >" & _
          "<ribbon>" & _
                "<tabs>"& _
                     "<tab id=""tbMyCustomTab"" label=""My Custom Tab"" visible=""true"">" & _
                        "<group id=""cgMyCustomGroup"" label=""My Custom Group"">" & _
                               "<button ... >" & _
    		"</group>" & _
                    "</tab>" & _
                "</tabs>" & _
           "</ribbon>" & _
        "</customUI>"

    There is already an existing custom tab on the Explorer with the same tab ID, but when I ran my addin, it creates another custom tab instead of using the same existing one. What am I doing wrong?

    Thank you.
    Anand


    Anand Kumar


    Ken Slovak MVP - Outlook
    Monday, September 17, 2012 6:20 PM
    Moderator
  • Hello Ken,

    Thank you for asking the right questions. I was creating a new custom tab rather than sharing an existing one. I did further googling on sharing Custom Tabs and using the xmlns and got the solution.

    For other viewers, information on sharing the same namespace and calling the same idQ attribute which lets your addins to share a custom tab are at: http://xldennis.wordpress.com/2009/03/11/sharing-custom-tabs-in-the-ribbon-ui/ (although its for Excel ribbon, you still get the idea how to use the xmlns)

    Thanks,
    Anand


    Anand Kumar

    • Marked as answer by a3kumarz Tuesday, September 18, 2012 12:13 AM
    Tuesday, September 18, 2012 12:13 AM