nsanchez
nsanchez

Reputation: 132

Customize Office Menu

I'm trying to add an item to Office file menu with ribbon but I have a problem with this because I can't add nothing to Office file menu.

I want to add a tab and an item in office menu with the same ribbon in a shared COM add-ing.

<?xml version="1.0" encoding="UTF-8"?>
<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui" onLoad="Ribbon_Load">
  <ribbon startFromScratch="false">
    <tabs>
      <tab idMso="TabAddIns" label="Zyncro">
        <group id="MyGroup" label="My Group">
        </group>
      </tab>
   </tabs>
    <officeMenu>
         ????????????
    </officeMenu>
  </ribbon>
</customUI>

Upvotes: 1

Views: 1029

Answers (1)

nsanchez
nsanchez

Reputation: 132

You can see an example in this link

The solution is:

<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui"  xmlns:x="TestAddin.Connect" onLoad="OnRibbonLoaded" loadImage="GetImage">
  <ribbon>
    <officeMenu>
      <menu id="menu" label="mySampleTab" imageMso="FileOpen" insertAfterMso="FileSaveAsMenu"  itemSize="large">
        <button id="button" imageMso="HappyFace" label="Split Button" onAction="button1"/>
        <menuSeparator id="separator1"/>
        <button id="button1" label="Button 1" onAction="button2"/>
        <button id="button2" label="Button 2" onAction="button3"/>
     </menu>
    </officeMenu>
    <tabs>
     <tab id="CustomTab" label="My Tab">
        <group id="SampleGroup" label="Sample Group">
          <button id="Button" label="Insert Company Name" size="large" onAction="InsertCompanyName" />
        </group>
      </tab>
    </tabs>
  </ribbon>
</customUI>

Upvotes: 1

Related Questions