﻿<?xml version="1.0" encoding="UTF-8"?>
<customUI onLoad="Ribbon_Load" xmlns="http://schemas.microsoft.com/office/2006/01/customui">
  <ribbon>
    <tabs>
      <tab idMso="TabMail">
        <group id="group1" label="myPlugins">
          <gallery id="SetCategory" imageMso="ColorMenu"
                   supertip="Assign message(s) to a category(ies)" label="Categorize" size="large"
                   getItemCount="catGallery_getItemCount"
                   getItemImage="catGallery_getItemImage"
                   getItemLabel="catGallery_getItemLabel"
                   onAction="catGallery_clicked"
                   >
            <!--getItemID="catGallery_getItemID"-->
            <button id="button1" label="&amp;All Categories..." showImage="false" />
          </gallery>
        </group>
      </tab>
    </tabs>
  </ribbon>
</customUI>
﻿<?xml version="1.0" encoding="UTF-8"?>
<customUI onLoad="Ribbon_Load" xmlns="http://schemas.microsoft.com/office/2006/01/customui">
  <ribbon>
    <tabs>
      <tab idMso="TabMail">
        <!-- Hide stock "Tags" group -->
        <group idMso="GroupMailOptions" visible="false" />
        <!-- And create a similar group, just with our new "Categorize" button instead of the original one -->
        <group id="MyGroupMailOptions" insertAfterMso="GroupMailOptions" label="Tags">
          <menu idMso="PolicyTagsMenu" size="large" />
          <button idMso="ToggleMarkAsRead" size="large"/>
          <gallery id="SetCategory" imageMso="ColorMenu"
                   supertip="Assign message(s) to a category(ies)" label="Categorize" size="large"
                   getItemCount="catGallery_getItemCount"
                   getItemImage="catGallery_getItemImage"
                   getItemLabel="catGallery_getItemLabel"
                   onAction="catGallery_clicked"
                   >
            <button idMso="AllCategories" />
            <button idMso="SetCategoryQuickClick" />
          </gallery>
          <menu idMso="FollowUpMenu" size="large" />
        </group>
      </tab>
    </tabs>
  </ribbon>
</customUI>
Replace stock button by re-creating a similarly-looking "Tabs" group
Replace stock button by re-creating a similarly-looking "Tabs" group
