Is it possible to customize a built-in contextual-tab using the Ribbon designer?

Eli 0 Reputation points
2023-02-25T19:06:18.75+00:00

In a core-tab like "TabHome" it works as expected, but in a contextual-tab (tools tab) like "TabHeaderAndFooterToolsDesign", my group doesn't show up on the screen.

(Maybe it's because this tab doesn't load immediately upon loading MSWord?)

Is there a way to fix this?

Thanks in advance!

Word
Word
A family of Microsoft word processing software products for creating web, email, and print documents.
652 questions
Office Development
Office Development
Office: A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.Development: The process of researching, productizing, and refining new or existing technologies.
3,450 questions
Word Management
Word Management
Word: A family of Microsoft word processing software products for creating web, email, and print documents.Management: The act or process of organizing, handling, directing or controlling something.
891 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. John Korchok 4,926 Reputation points
    2023-03-03T15:27:55.3766667+00:00

    Posting the XML would help. Context menu customizations will not appear in the <ribbon> group, but in a separate <contextMenus> group. Here is a sample of a couple of modified context menu groups:

        <ribbon>
            <!-- Ribbon mods go here -->
        </ribbon>
        <contextMenus>
            <contextMenu idMso="ContextMenuChartArea">
                <button idMso="ChartChangeType" visible="false" />
                <button 
                    id="CCCustom1"
                    insertBeforeMso="ChartSaveTemplates"
                    imageMso="ChartInsert"
                    label="Change Chart Type"
                    supertip="Change to a different type of chart."
                    showImage="true"
                    showLabel="true"
                    onAction="ChartChange"/>
            </contextMenu>
            <contextMenu idMso="ContextMenuChartAxis">
                <button idMso="ChartChangeType" visible="false" />
                <button 
                    id="CCCustom2"
                    insertBeforeMso="ChartEditDataMenu"
                    imageMso="ChartInsert"
                    label="Change Chart Type"
                    supertip="Change to a different type of chart."
                    showImage="true"
                    showLabel="true"
                    onAction="ChartChange"/>
            </contextMenu>
        </contextMenus>
    
    1 person found this answer helpful.
    0 comments No comments

  2. Charles Kenyon 2,561 Reputation points
    2023-02-26T20:35:04.9833333+00:00

    How are you creating the change? I see you tagged this with Visual Studio. I've done my modifications through XML (which Visual Studio will handle, although not well, IMO) or using the inferior tools built into the UI.

    It sounds as if you are trying to modify a contextual tab that already exists. That should work. It does for me using either of these. I've made extensive changes to the Header/Footer Tools tab shown below.User's image

    See https://gregmaxey.com/word_tip_pages/customize_ribbon_main.html.