Outlook Plugin – Finding the ImageMSO for the ribbon

Ages ago, I wrote an Outlook plugin for saving emails (.msg files) from Outlook 2003 to SharePoint 2007. Well, the time had come to upgrade that to Outlook 2010. Broadly speaking, that went well, with one exception – what icon to show in the ribbon?

I didn’t want to go through the pain of designing my own icon (in its various different sizes), so I decided to highjack one of the office ones. The customer I was dealing with wanted the ‘Filing cabinet’ icon of the ‘Auto Archive Settings’ button.

AutoArchive settings on the ribbon

Fine, no problem, it’s built in – in it’s various sizes and resolutions. Except – what is its ID?

When defining the button on the ribbon you have to specify an imageMso setting – but there doesn’t seem to be much information on the Outlook ones. There is some information about 2007, but even that seems incomplete for Outlook 2010. So how the hell do I find that ID?

Well, in a moment of inspiration, it struck me that you can add things to the ‘Quick Access Toolbar’ at the top of Outlook. So I did this!

Fine – but where does that get us? Well, that has to be stored somewhere. And it’s specific to me – so it must be in my profile somewhere. I did some digging and found a likely looking file within my profile AppDataLocalMicrosoftOffice

The file olkexplorer.officeUI is actually XML, and does contain the definition of the quick access toolbar:

<mso:customUI xmlns:mso="http://schemas.microsoft.com/office/2009/07/customui">
<mso:control idQ="mso:FilePrint" visible="false"/>
<mso:control idQ="mso:FileSaveAs" visible="false"/>
<mso:control idQ="mso:SendReceiveAll" visible="true"/>
<mso:control idQ="mso:UpdateFolder" visible="false"/>
<mso:control idQ="mso:NavBack" visible="false"/>
<mso:control idQ="mso:NavForward" visible="false"/>
<mso:control idQ="mso:Delete" visible="false"/>
<mso:control idQ="mso:Undo" visible="true"/>
<mso:control idQ="mso:EmptyTrash" visible="false"/>
<mso:control idQ="mso:FindContactCombo" visible="false"/>
<mso:control idQ="mso:AutoArchiveSettings" visible="true"/>

There we can see the ID being used – so in my XML for my ribbon I just used imageMso=”AutoArchiveSettings”, and voila! Icon.

But hopefully this would work as a general technique for finding the IDs icons of images used in the office ribbon, where it isn’t documented.

Outlook Plugin – Finding the ImageMSO for the ribbon

One thought on “Outlook Plugin – Finding the ImageMSO for the ribbon

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s