Search code examples
xmloutlookadd-inoutlook-addinribbon-control

Can't access Mso 'Attach File' button while making a custom group in a built-in Microsoft Outlook ribbon


I'm trying to make my own add-in group on the built in ribbon of the Compose Mail form in Microsoft Outlook 2016. I have an XML file that is overriding the XML of the "TabNewMailMessage" tab of the Compose Mail Ribbon. I am able to retrieve the AttachItemCombo menu and the SignatureInsertMenu, but or some reason, the AttachFile button is not appearing when I run the project. Is the AttachFile not a button anymore? I'm using Outlook 2016 and using the 2013 documentation as a reference. What am I missing or doing wrong? I have the original Include group in my picture alonside my custom Include group, notice how the other two menu buttons are present, but not the AttachFile button with the paperclip. I've also included my XML file. Thanks!

Screen shot of my Outlook add-in ribbon

My XML file of my customized ribbon

Update: I added a "visible = "true" statement to the xml for the attach file button and it appeared, but does not have the dropdown arrow like the original button. I need that drop down menu! The attach file button I created has no dropdown menu and just sends you into browse for files window

enter image description here

<?xml version="1.0" encoding="UTF-8"?>
<customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui" onLoad="Ribbon_Load">
  <ribbon>
    <tabs>
      <tab idMso="TabNewMailMessage">
        <group idMso="GroupIncludeMainTab" visible="true"/>
      </tab>
            <tab idMso="TabNewMailMessage">
                <group id="GroupInclude" label ="Include" insertBeforeMso="GroupMessageOptions">
                    <button idMso ="AttachFile"  visible ="true" size ="large"/>
                    <menu idMso="AttachItemCombo" size="large"/>
                    <menu idMso="SignatureInsertMenu" size="large">
                        <button id="EditSignatureButton"
                                        label="Edit Signature"
                                        onAction="OnEditSignature"/>
                    </menu>
                </group>
            </tab>
    </tabs>
  </ribbon>
</customUI>

Solution

  • I ended up finding that they have a download of Office 2016 Help Files: Office Fluent User Interface Control Identifiers available on the internet which listed that the new AttachFile button is actually called AttachFileSplit and is no longer a button, but a gallery. So the correct xml syntax to make this button show up is shown here:

     <?xml version="1.0" encoding="UTF-8"?>
    <customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui" onLoad="Ribbon_Load">
      <ribbon>
        <tabs>
          <tab idMso="TabNewMailMessage">
            <group idMso="GroupIncludeMainTab" visible="false"/>
          </tab>
                <tab idMso="TabNewMailMessage">
                    <group id="GroupInclude" label ="Include" insertBeforeMso="GroupMessageOptions">
                        <gallery idMso ="AttachFileSplit"  visible ="true" size ="large"/>
                        <!--<splitButton idMso ="PasteMenu" visible="true" size="large"/>-->
                        <menu idMso="AttachItemCombo" size="large"/>
                        <menu idMso="SignatureInsertMenu" size="large">
                            <button id="EditSignatureButton"
                                            label="Edit Signature"
                                            onAction="OnEditSignature"/>
                        </menu>
                    </group>
                </tab>
        </tabs>
      </ribbon>
    </customUI>