View Single Post
 
Old Yesterday, 10:23 AM
Charles Kenyon Charles Kenyon is offline Windows 11 Office 2021
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,552
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

Quote:
Added the code below to a new template:
Code:
<customUI  
     xmlns="http://schemas.microsoft.com/office/2009/07/customui" 
    xmlns:mso="http://schemas.microsoft.com/office/2009/07/customui" >
    <ribbon >
        <tabs >
            <tab id="newTab" >
                <group id="newGroup" >
                    <mso:gallery idQ="mso:TextHighlightColorPicker" showInRibbon="false" visible="true"/>
                </group >
            </tab >
        </tabs >
    </ribbon >
 </customUI >
It has been a while since I dabbled in Ribbon modification. Decided to give it a try, too.

When I added the code for the tab to one of my custom ribbon templates OfficeRibbonEditor's validate generated:
'mso' is an undeclared prefix. Line 257, position 10.

When run in Word, I get a similar error message:

The entire customization fails.

Then I tried a clean dotx template with your full code. (attached)
I get the same error message as you, but the custom tab does not show up so no access to the button/menu.

I would be tempted to try writing it in a .dotm with a custom split-button menu and callbacks, but that is a lot more work and would require that the client give macro permission.


P.S. Even though this is not vba, it occurs to me that it would probably be better in the vba forum. I can move it if others agree.
Attached Files
File Type: dotx RibbonTest.dotx (42.9 KB, 0 views)
Reply With Quote