2

Can't seem to find any simple VBA tutorials for adding a custom group to the Home tab in the Outlook 2010 ribbon.

Shouldn't it be a couple of simple steps involving something like traversing objects in the Home tab and programmatically add the group with controls etc, or redefine the XML that describes the Home tab.

Is there any sample VBA code or articles that have this simple example? Specifically I'm trying to add a custom group with 1 text field and 1 button that fires a custom macro.

Cheers, Dave --Trindaz on Fedang #outlook-2010-vba

1
  • msdn.microsoft.com/en-us/library/… says "In the case of Outlook, only COM add-ins can customize the Fluent UI." Maybe VBA just isn't an option for customizing Outlook 2010 ribbon?
    – Trindaz
    Commented Sep 28, 2010 at 13:30

2 Answers 2

7

I wasn't able to get any VBA working for this, but I was able to...

  1. Create a new Outlook 2007 project type in Visual Studio 2008
  2. Add a new Ribbon (XML) item to the project
  3. Follow the instructions in the sample code in the newly created Ribbon1.vb
  4. Make sure the <tab> element in Ribbon1.xml has property idMso="TabMail"
  5. Publish and run the installer application to get the new items appearing in the Home tab of the Outlook ribbon

Done!

3
  • I've been looking everywhere for this info, cheers. Why oh Why is a tab labelled "Home" in Outlook called "TabMail" in COM??!?! Commented Nov 10, 2011 at 11:39
  • 1
    LOL - why are Excel data tables called ListObjects under the covers ? silly MS :) Commented Apr 16, 2012 at 20:56
  • This makes me really want to get Visual Studio (I was trying to do this too, and also failing with VBA).
    – enderland
    Commented Mar 1, 2013 at 15:21
3

Another answer using Ribbon XML for Outlook 2010:

 <customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui" onLoad="Ribbon_Load">
  <ribbon>
    <tabs>
      <tab idMso="TabMail">
        <group id="Group0"  label="my Group" insertBeforeMso="GroupMoveActions">
          <button id="myButton"
              size="large"
              label="someLabel"
              screentip="A tip to read..."
              supertip="Some super tip..."
              />
        </group>
      </tab>
    </tabs>
  </ribbon>
</customUI>

You can also download this file: Office 2010 Help Files which contains the IDs of the Outlook controls. Once installed, look for the file OutlookExplorerControls.xlsx, this file contains the names of the groups you can use for the property insertBeforeMso.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.