none
contexualTabs problem RRS feed

  • Question

  • I'm using Access 2016 creating a ribbon when I added the contextualTab portion it doesn't want to work any more

    What am I doing wrong?

    Thank you

    <customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui">
    <ribbon startFromScratch="true">
    	
    <backstage>
    <tab idMso="TabInfo" visible="false" />
    <tab idMso="TabOfficeStart" visible="false" />
    <tab idMso="TabPrint" visible="true" />
    <tab idMso="TabHelp" visible="false" />
    <tab idMso="TabSave" visible="false" />
    <button idMso="FileOpen" visible="false" />
    <button idMso="FileSave" visible="true" />
    <button idMso="ApplicationOptionsDialog" visible="false" />
    </backstage>
    
    <contextualTabs>
          <tabSet idMso="TabSetFormDatasheet" >
    	<tab idMso="TabFormDatasheet">
    	<group idMso="GroupViews" visible="false" />
    <group idMso="GroupFieldsTools" visible="false" />
    	</group>
    </tab>
          </tabSet>
        </contextualTabs>
    </ribbon>
    </customUI>
    

    Thursday, January 25, 2018 2:55 AM

Answers

  • Hello dcsmontana,

    How do you want to custom the ribbon? I note that you specific startFromScratch as true, do you want to create a new ribbon with all built-in tabs hidden?

    I failed to know which two groups you want to hide according to the group idMso. I would suggest you share a screen shot or tell us the detail steps how could we see these groups so we could try to test the xml for your.

    However, it is obvious that your XML is invalidated. Backstage is not child element of Ribbon, you need put it outside ribbon tag. You added additional end tag for GroupFieldsTools group. There is no "FileOpen" button  in backstage, if you want to hide the Open tab in backstage, you need hide the "FileRecent" tab.

    Here is my simply xml.

    <customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui">
    <ribbon startFromScratch="true">
    <contextualTabs>
          <tabSet idMso="TabSetFormDatasheet" >
    	<tab idMso="TabFormDatasheet">
    	<group idMso="GroupViews" visible="false" />
            <group idMso="GroupFieldsTools" visible="false" />
            </tab>
          </tabSet>
    </contextualTabs>	
    </ribbon>
    <backstage>
    <tab idMso="TabInfo" visible="false" />
    <tab idMso="TabOfficeStart" visible="false" />
    <tab idMso="TabPrint" visible="true" />
    <tab idMso="TabHelp" visible="false" />
    <tab idMso="TabSave" visible="false" />
    <tab idMso="TabRecent" visible="false" />
    <button idMso="FileSave" visible="true" />
    <button idMso="ApplicationOptionsDialog" visible="false" />
    </backstage>	
    </customUI>

    Besides, for customizing ribbon, I would suggest check Show add-in user interface errors checkbox. It could help you check your xml validation. You could go to File->Option->Client Setting->General to check it.

    Please try to refer to below link for more information.

    Customize the Ribbon

    Best Regards,

    Terry


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by dcsmontana Wednesday, January 31, 2018 3:21 AM
    Thursday, January 25, 2018 7:09 AM
  • thank You a few miner changes and it worked great needed to hide the form datasheet tab that showed up when a table was in focus. didn't need the Groups at all and decided to keep the home tab. My database will be public and I need to protect it as much as possible.  I turned 60 and had a stroke last year, and now trying to learn something new and having fun with it. Thanks again
    <customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui">
    <ribbon startFromScratch="true">
    <tabs>
    <tab id="Home" label="Home">
    <group idMso="GroupClipboard" />
    <group idMso="GroupTextFormatting" />
    <group idMso="GroupRichText" />
    <group idMso="GroupRecords" />
    <group idMso="GroupSortAndFilter" />
    <group idMso="GroupFindAccess" />
    </tab>
        </tabs>
    <contextualTabs>
          <tabSet idMso="TabSetFormDatasheet" visible="false" />
    </contextualTabs>	
    </ribbon>
    <backstage>
    <tab idMso="TabInfo" visible="false" />
    <tab idMso="TabOfficeStart" visible="false" />
    <tab idMso="TabPrint" visible="true" />
    <tab idMso="TabHelp" visible="false" />
    <tab idMso="TabSave" visible="false" />
    <tab idMso="TabRecent" visible="false" />
    <button idMso="FileSave" visible="true" />
    <button idMso="ApplicationOptionsDialog" visible="false" />
    </backstage>
    </customUI>
    

     
    • Marked as answer by dcsmontana Wednesday, January 31, 2018 3:21 AM
    Wednesday, January 31, 2018 3:21 AM

All replies

  • Hello dcsmontana,

    How do you want to custom the ribbon? I note that you specific startFromScratch as true, do you want to create a new ribbon with all built-in tabs hidden?

    I failed to know which two groups you want to hide according to the group idMso. I would suggest you share a screen shot or tell us the detail steps how could we see these groups so we could try to test the xml for your.

    However, it is obvious that your XML is invalidated. Backstage is not child element of Ribbon, you need put it outside ribbon tag. You added additional end tag for GroupFieldsTools group. There is no "FileOpen" button  in backstage, if you want to hide the Open tab in backstage, you need hide the "FileRecent" tab.

    Here is my simply xml.

    <customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui">
    <ribbon startFromScratch="true">
    <contextualTabs>
          <tabSet idMso="TabSetFormDatasheet" >
    	<tab idMso="TabFormDatasheet">
    	<group idMso="GroupViews" visible="false" />
            <group idMso="GroupFieldsTools" visible="false" />
            </tab>
          </tabSet>
    </contextualTabs>	
    </ribbon>
    <backstage>
    <tab idMso="TabInfo" visible="false" />
    <tab idMso="TabOfficeStart" visible="false" />
    <tab idMso="TabPrint" visible="true" />
    <tab idMso="TabHelp" visible="false" />
    <tab idMso="TabSave" visible="false" />
    <tab idMso="TabRecent" visible="false" />
    <button idMso="FileSave" visible="true" />
    <button idMso="ApplicationOptionsDialog" visible="false" />
    </backstage>	
    </customUI>

    Besides, for customizing ribbon, I would suggest check Show add-in user interface errors checkbox. It could help you check your xml validation. You could go to File->Option->Client Setting->General to check it.

    Please try to refer to below link for more information.

    Customize the Ribbon

    Best Regards,

    Terry


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by dcsmontana Wednesday, January 31, 2018 3:21 AM
    Thursday, January 25, 2018 7:09 AM
  • thank You a few miner changes and it worked great needed to hide the form datasheet tab that showed up when a table was in focus. didn't need the Groups at all and decided to keep the home tab. My database will be public and I need to protect it as much as possible.  I turned 60 and had a stroke last year, and now trying to learn something new and having fun with it. Thanks again
    <customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui">
    <ribbon startFromScratch="true">
    <tabs>
    <tab id="Home" label="Home">
    <group idMso="GroupClipboard" />
    <group idMso="GroupTextFormatting" />
    <group idMso="GroupRichText" />
    <group idMso="GroupRecords" />
    <group idMso="GroupSortAndFilter" />
    <group idMso="GroupFindAccess" />
    </tab>
        </tabs>
    <contextualTabs>
          <tabSet idMso="TabSetFormDatasheet" visible="false" />
    </contextualTabs>	
    </ribbon>
    <backstage>
    <tab idMso="TabInfo" visible="false" />
    <tab idMso="TabOfficeStart" visible="false" />
    <tab idMso="TabPrint" visible="true" />
    <tab idMso="TabHelp" visible="false" />
    <tab idMso="TabSave" visible="false" />
    <tab idMso="TabRecent" visible="false" />
    <button idMso="FileSave" visible="true" />
    <button idMso="ApplicationOptionsDialog" visible="false" />
    </backstage>
    </customUI>
    

     
    • Marked as answer by dcsmontana Wednesday, January 31, 2018 3:21 AM
    Wednesday, January 31, 2018 3:21 AM