none
My Customised TAB is visible but dimmed RRS feed

  • Question

  • Hi,

    In my Word 2016 (Office 365) I'm experiencing in the last days this new unespected behavior: my Tab is shown but it's not readeble if you don't first move the mouse on it.

    Here my XML:

    <?xml version="1.0" encoding="utf-8"?>
    <customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui" onLoad="rxIRibbonUI_onLoad">
      <ribbon startFromScratch="false">
        <tabs>
          <tab id="rxtabQuestionari" insertBeforeMso="TabHome" getLabel="rxtabQuestionari_getLabel"></tab>
        </tabs>
      </ribbon>
    </customUI>

    And my callback:

    Public gMyRibbon As IRibbonUI
    
    Sub rxIRibbonUI_onLoad(Ribbon As IRibbonUI)
       Set gMyRibbon = Ribbon
    End Sub
    Sub rxtabQuestionari_getLabel(control As IRibbonControl, ByRef returnedVal)
       returnedVal = "ComeOn"
    End Sub

    Strange enough?!

    Lauro

    Tuesday, September 4, 2018 2:13 PM

Answers

  • Good news! I updated my Office 365 installation today (from version 1807 to 1808) and the issue does not occur anymore. I verified it on a second machine.

    Luca

    • Marked as answer by Lauro2 Friday, September 7, 2018 7:02 AM
    Friday, September 7, 2018 6:32 AM

All replies

  • Hi Lauro


    I can only confirm. The same happens with my custom tab. I'd say this started about 2 months ago (I'm using monthly update channel).


    Seems the issue occurs only if the custom tab is activated as first tab on the left when starting the application (PowerPoint, Excel, Word). So I'd guess it would still work properly if you change/remove the insertBeforeMso="TabHome" part...

    Luca

    Tuesday, September 4, 2018 3:21 PM
  • Thanks Luca for your answer.

    I followed your suggestion I removed the "insertBeforeMso="TabHome" and it's OK. I tried with "insertAfterMso="TabHome" and it's OK too.

    Maybe it doesn't "like" to be the one tab highligthed...

    As you said I noticed this strange behavior only very recently.

    Lauro

    Wednesday, September 5, 2018 8:09 AM
  • Little more information.

    If the ribbon is compressed, it's OK too.

    Lauro

    Wednesday, September 5, 2018 8:29 AM
  • Hi Lauro,

    According to my test and understanding, the custom TAB is after the File TAB, but this TAB does not have a name.

    Based on my test with your code, I can see the custom Tab is next to the File Tab. However your custom tab do not have a name.

    In order to see your custom tab, I suggest you add label attribute in your custom tab.  

    There is a downside for your code which will not let you use getLabel attribute.  I’ve not yet to find a work around for both attributes to work together.

    So choose attribute according your needs.

    The use of the label property is as follows:

    <?xml version="1.0" encoding="utf-8"?>
    <customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui" onLoad="rxIRibbonUI_onLoad">
      <ribbon startFromScratch="false">
        <tabs>
          <tab id="rxtabQuestionari" insertBeforeMso="TabHome" label="ABC"></tab>
          <!--insertBeforeMso="TabHome" getLabel = "rxtabQuestionari_getLabel" -->
        </tabs>
      </ribbon>
    </customUI>

    Best Regards,

    Bruce


    Wednesday, September 5, 2018 9:30 AM
    Moderator
  • Hi Lauro

    That's an interesting finding! Indeed the issue seems to not occur of the ribbon is collapsed ("tabs visible only").

    However, in the meantime I found a workaround which at least works for one of my add-ins in PowerPoint. I suppose the same approach could work in Word/Excel, too.

    In my GetLabel method I added code to select the Home tab and then switch back to my custom tab. Seems this somehow "refreshes" the tab label.

    In your code above this would look something like this:

    Sub rxtabQuestionari_getLabel(control As IRibbonControl, ByRef returnedVal)
    	returnedVal = "ComeOn"
    	gMyRibbon.ActivateTabMso "TabHome"
    	DoEvents
    	gMyRibbon.ActivateTab "rxtabQuestionari"
    End Sub

    Maybe you want to give it a try in your project? Depending on what you're doing it might be sound to make sure the additional commands run just once. Otherwise, it can be confusing for users if the selected tab suddenly changes without warning.

    Luca


    • Edited by Luca Brasi Wednesday, September 5, 2018 10:57 AM
    Wednesday, September 5, 2018 10:56 AM
  • Good news! I updated my Office 365 installation today (from version 1807 to 1808) and the issue does not occur anymore. I verified it on a second machine.

    Luca

    • Marked as answer by Lauro2 Friday, September 7, 2018 7:02 AM
    Friday, September 7, 2018 6:32 AM
  • YES,

    I tried and I can confirm that the problem doesn't arise anymore.

    BUT I still have the 1807 Version....

    Ciao Lauro

    Friday, September 7, 2018 7:02 AM