Reputation: 17849
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
Upvotes: 2
Views: 6855
Reputation: 4331
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.
Upvotes: 3
Reputation: 17849
I wasn't able to get any VBA working for this, but I was able to...
<tab>
element in Ribbon1.xml has property idMso="TabMail"
Done!
Upvotes: 7