Forum Discussion

etceterad's avatar
etceterad
Copper Contributor
Jan 06, 2022

Is it possible to add one custom button of your add-in to the existing tab at the ribbon and one to

I'm trying to add 2 buttons to the different tabs in Word via XML Manifest, but now for me, it seems to be impossible. That's all because I can't add OfficeTab and CustomTab in ExtensionPoint with xsi:type="PrimaryCommandSurface". Are there any other possibilities to implement such an idea?

5 Replies

  • It is not really clear what you are wanting to do. However, see the following page of Greg Maxey's website
    https://gregmaxey.com/word_tip_pages/customize_ribbon_main.html
    The following xml code adds a custom button to the Mailings tab of the ribbon

    <customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui">
    <ribbon>
    <tabs>
    <tab idMso="TabMailings">
    <group id="customGroup" label="Merge Special" insertAfterMso="GroupMailMergeFinish">
    <button id="customButton" label="Merge to Word and PDF" size="large" imageMso="ExportToVCardFile" onAction="MergetoWordPDF" />
    </group>
    </tab>
    </tabs>
    </ribbon>
    </customUI>
    • etceterad's avatar
      etceterad
      Copper Contributor
      Thanks for the advice, but it's probably not the thing that I was looking for.
      As I write in the description I want to add 2 custom buttons of my add-in - one on the existing "Home" tab and another one on the custom tab. Additionally, I'm using the new syntax of XML Manifest, such as described here: https://docs.microsoft.com/ru-ru/office/dev/add-ins/develop/add-in-manifests?tabs=tabid-1
      • I beg to differ. To add a custom button to the Home tab, you must use the Custom UI Editor and with it, you can also create a custom tab to which you can add a other custom (or built-in) buttons.

Resources