Share via

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!

Microsoft 365 and Office | Development | Other
Microsoft 365 and Office | Word | For business | Windows
0 comments No comments

2 answers

Sort by: Most helpful
  1. John Korchok 232.4K Reputation points Volunteer Moderator
    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>
    

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments

  2. Charles Kenyon 167.4K Reputation points Volunteer Moderator
    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.

    Was this answer helpful?


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.