Remove All Tabs from Ribbon except Custom Tab

R

RyanH

I virtually know nothing about XML. I would like to remove all the tabs from
the ribbon except my Custom Tab, how can I do this?

This is what I have in the Microsoft Office Custom UI:

<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui">
<ribbon>
<tabs>
<tab idMso="TabHome" visible="false"/>
<tab idMso="TabInsert" visible="false"/>
<tab idMso="TabPageLayout" visible="false"/>
<tab idMso="TabFormulas" visible="false"/>
<tab idMso="TabData" visible="false"/>
<tab idMso="TabReview" visible="false"/>
<tab idMso="TabView" visible="false"/>
<tab idMso="TabDeveloper" visible="false"/>
<tab id="customTab" label="AdTech" insertAfterMso="Developer">
<group id="customGroup" label="Global Production Schedule">
<button id="custombutton1" label="Import Macola Data" size="large"
onAction="a" imageMso="ImportExcel" />
<button id="custombutton2" label="Send To Archive" size="large"
onAction="a" imageMso="Piggy" /> <button id="custombutton4"
label="Sort by Sales Order" size="large" onAction="a" imageMso="Grouping" />
<button id="custombutton3" label="Create Ready Schedule" size="large"
onAction="a" imageMso="NewTask" />
<button id="custombutton5" label="Create Sales Schedule" size="large"
onAction="a" imageMso="AccountMenu" />
<button id="custombutton6" label="Compile Dept. Schedules" size="large"
onAction="a" imageMso="FormsMenu" />
</group>
</tab>
</tabs>
</ribbon>
</customUI>
 
R

Ron de Bruin

There is a dictator example in the xml examples on my ribbon page (point 2)

Here it is

<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui">


<!-- **************************************************************************-->
<!-- ****Disable 'Exit Excel' and 'Excel Options' on the Office button menu****-->
<!-- **************************************************************************-->

<commands>
<!-- Disable Excel Options on the Office button menu-->
<command idMso="ApplicationOptionsDialog" enabled="false"/>

<!-- Disable Exit Excel on the Office button menu-->
<command idMso="FileExit" enabled="false"/>
</commands>



<!-- *******************************************************************-->
<!-- **********Set startFromScratch to true to hide the ribbon**********-->
<!-- **********Hide New, Open and Save on the Office button menu********-->
<!-- *******************************************************************-->


<!-- Set startFromScratch to true to hide the ribbon-->
<ribbon startFromScratch="true">

<!-- startFromScratch="true" hides all of the ribbon tabs and it hides the QAT. -->
<!-- It also hides most of the commands on the Office button menu, but for some -->
<!-- reason, it does not hide the 'New', 'Open' and 'Save' commands. -->
<!-- So if you want to hide them you have to add this to your RibbonX file: -->

<officeMenu>
<button idMso="FileNew" visible="false"/>
<button idMso="FileOpen" visible="false"/>
<button idMso="FileSave" visible="false" />
</officeMenu>


<!-- Add Custom tab to the ribbon with your own buttons-->
<!-- The example add three groups to the new tab named 'My Tab' -->
<!-- On the last tab there is a menu with five options-->
<!-- Click on the "generate Callbacks" button in the UI editor to create the macro(s)-->
<!-- You can copy them in a module in your workbook then and add your code-->

<tabs>
<tab id="MyCustomTab" label="My Tab" >

<group id="customGroup1" label="Group 1">
<button id="customButton1" label="Caption 1" size="normal" onAction="Macro1" imageMso="DirectRepliesTo" />
<button id="customButton2" label="Caption 2" size="normal" onAction="Macro2" imageMso="AccountMenu" />
<button id="customButton3" label="Caption 3" size="normal" onAction="Macro3" imageMso="RegionLayoutMenu" />
</group>

<group id="customGroup2" label="Group 2">
<button id="customButton4" label="Caption 4" size="normal" onAction="Macro4" imageMso="TextAlignGallery" />
<button id="customButton5" label="Caption 5" size="normal" onAction="Macro5" imageMso="PrintPreviewClose" />
<button id="customButton6" label="Caption 6" size="normal" onAction="Macro6" imageMso="PrintPreviewShrinkOnePage" />
<separator id="MySeparator1" />
<button id="customButton7" label="Caption 7" size="large" onAction="Macro7" imageMso="ReviewPreviousComment" />
</group>

<group id="customGroup3" label="Group 3">
<menu id="MyDropdownMenu" label="My Menu" size="large" imageMso="TextAlignGallery" >
<button id="customButton8" label="Caption 8" onAction="Macro8" imageMso="TextAlignGallery" />
<button id="customButton9" label="Caption 9" onAction="Macro9" imageMso="TextAlignGallery" />
<button id="customButton10" label="Caption 10" onAction="Macro10" imageMso="TextAlignGallery" />
<button id="customButton11" label="Caption 11" onAction="Macro11" imageMso="TextAlignGallery" />
<button id="customButton12" label="Caption 12" onAction="Macro12" imageMso="TextAlignGallery" />
</menu>
</group>

</tab>
</tabs>

</ribbon>


</customUI>


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


Gary Keramidas said:
don't use 2007, but does ron's site help?

http://www.rondebruin.nl/ribbon.htm
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top