Bug or By Design?

G

Greg Maxey

I know, or at least think I know, that you can not change the order of the
built-in Ribbon tabs using RibbonXML or VBA. In an attempt to work around
this restriction I created the following RibbonXML:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui">
<ribbon>
<tabs>
<tab id="TabAdd-Ins" visiblel="false">
<tab id="myTabAddIns" insertAfterMso="TabHome" label="Add-Ins">
<group idMso="GroupAddInsMenuCommands"/>
<group idMso="GroupAddInsToolbarCommands"/>
<group idMso="GroupAddInsCustomToolbars"/>
</tab>
</tabs>
</ribbon>
</customUI>

The idea being to hide the built-in TabAdd-Ins and replicate with a custom
tab inserted after the TabHome.

The XML validates, but when I attempt to open the document in Word, Word
throws three errors:

"Failed to find Office Control by ID" GroupAddInsMenuCommands
"Failed to find Office Control by ID" GroupAddInsToolbarCommands
"Failed to find Office Control by ID" GroupAddInsCustomToolbars

Note to seet these errors you must have "Word Options>Advanced>General>Show
add-in user interface errors" checked"

I know that I am using the correct idMso in my XML. I can use the following
XML to hide each of those groups in the built-in TabAddIns tab:

<tab idMso="TabAddIns" >
<group idMso="GroupAddInsMenuCommands" visible="false"/>
<group idMso="GroupAddInsToolbarCommands" visible="false"/>
<group idMso="GroupAddInsCustomToolbars" visible="false"/>
</tab>
Does anyone know if this is by design (can't used the Add-Ins tab groups
anywhere except the Add-Ins tab or QAT), or is it a bug?

Thanks.
 
D

Doug Robbins - Word MVP

Hi Greg,

Based on my reading of Martin/Puls and Henning, to hide a built-in tab, you
would use

<tab idMso = "TabAddIns"
visible="false">
</tab>

But your code might work if you used

<tab id="TabAdd-Ins" visible="false">

rather than

<tab id="TabAdd-Ins" visiblel="false">



--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP, originally posted via msnews.microsoft.com
 
D

Doug Robbins - Word MVP

I guess that did not really answer your final question, but using

<tab idMso = "TabAddIns"
visible="false">
</tab>

did hide the builtin Add-Ins tab while your code with the corrected
spelling did not.

However, the Add-Ins tab that appeared after the Home tab was empty.

A thought is that it may be something to do with the order in which the
templates are loaded and also due to the fact that the content of the built
in Add-Ins tab is created "on the fly" - If there are no Add-ins loaded,
there is no Add-Ins tab on the Ribbon. As Add-ins are loaded back into
Word, one at a time, the built in Add-ins tab appears after loading the
first add-in that requires it and then when subsequent add-ins are loaded,
one at a time, the Add-ins tab is further populated as required. Not the
"Custom" add-ins tab however.
--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP, originally posted via msnews.microsoft.com
 
G

Greg Maxey

Doug,

However, the Add-Ins tab that appeared after the Home tab was empty.

Empty yes. Did you get the three error messages? Do you have the Word
Options set to display Add-in user interface errors?

The error returned is Failed to find Office Control by Id.

That doesn't make sense. It seems that if you can display the groups
GroupAddInsMenuCommands, GroupAddInsToolbarCommands and
GroupAddInsCustomToolbars on the QAT then you should be able to display them
 
D

Doug Robbins - Word MVP

Hi Greg,

Yes, I did receive the error messages. And the same thing happens when
trying to use the AddIns Groups in Excel

Doug Robbins - Word MVP, originally posted via msnews.microsoft.com
 

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