Rearrange Ribbon Tabs/Ribbon startFromScratch

G

Greg Maxey

Again, posting here for a lack of a better place. I have asked my MVP Lead
about a dedicated channel to address Ribbon issues.

Yesterday, as a pure mental exercise, I was trying rearrange the Tabs on the
ribbon. A monumental challenge and the ribbon still has the upper hand. I
thought that I could hide an existing tab and then place the same control
before or after another existing tab. I tried:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui">
<ribbon >
<tabs>
<tab idMso="TabInsert" visible="false" />
<tab idMso="TabInsert" insertBeforeMso="TabHome" />
</tabs>
</ribbon>
</customUI>

No joy. The existing Insert tab disappears, but no new one takes its place
before the Home tab :-(

Today I thought I would experiemnt with the ribbon attirbute
startFromScracth. Sure enough:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui">
<ribbon startFromScratch="true" >
</ribbon>
</customUI>

Produces a bare bones Office Menu and and blank ribbon. I thought that
rearranging the tabs on the ribbon would be a simple exercise of adding them
in the order I wanted to a blank ribbon.

To my complete surprise the RibbonX script shown below fails to put built-in
tabs onto a startFromScratch blank ribbon:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui">
<ribbon startFromScratch="true" >
<tabs >
<tab idMso="TabHome" />
<tab idMso="TabPageLayoutWord" />
<tab idMso="TabView" />
</tabs>
</ribbon>
</customUI>

I was also surprised to learn that while I can add most built in controls to
a startFromScratch OfficeMenu, I can't seem to be able to but controls that
reside on the default OfficeMenu back on a startFromScratch OfficeMenu

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui">
<ribbon startFromScratch="true" >
<officeMenu>
<button idMso="RedoOrRepeat" />
<!--Attempt to add one of the default controls back to the officeMenu
fails-->
<button idMso="FileClose" />
</officeMenu>
<tabs>
<tab id="Tab1" label="Test" />
<!--Attempts to place a built-in Tab control fails-->
<tab idMso="TabHome" />
</tabs>
</ribbon>
</customUI>

Does anyone no the purpose or logic of not being able to add a built in tab
to a blank ribbon or why you can't add any command to a startFromScratch
OfficeMenu?

Thanks.
 

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