Office 2007 Icon Gallery

No more fooling around trying to figure out what the idMso is for the built in Excel commands when you're trying to customize the Ribbon. There is a great little download available from Microsoft to add a group of galleries to the Developer tab on the Excel ribbon. So what's in the galleries? Check this out:

And when you click on a button, you get a little expansion like below:


Not too shabby! Finally there is an easy way to figure out the idMso for the built in commands, and browse all the images in an easy to use location. (Okay, granted, I just found it, and I'm sure it's been up for a while. 😉 ) The really good thing here is that you can see ALL the images, not just the ones that are on the menus. Not to mention that this is actually efficient. You don't actually have to click on the item to get the id!
As an FYI, you'll need to pass the Genuine Validation tests to download the file, but so long as you can, it's all good. It comes as an .exe file (go figure), that extracts an .xlsm file. (Excel Macro enabled workbook.)

The one change I made to this, based on the recommendations of a friend, was to save the file as an Excel add-in (.xlam). Once done, I installed it as an Add-in (Office menu|Excel Options|Add-ins|Go). I now have it available whenever I need it.

EDIT February 23, 2007:

Based on Zack's feedback, I thought I'd make this change as well. I added a textbox to the userform, and modified the onAction code to the following:

[vb]Sub OnAction(control As IRibbonControl, id As String, index As Integer)
If (control.Tag = "large") Then
id = Strings.Mid(id, 3)
End If

Dim form As New ControlInfoForm
With form
.nameX.Caption = "imageMso: "
.tbMso = id
Set .Image1.Picture = Application.CommandBars.GetImageMso(id, 16, 16)
Set .Image2.Picture = Application.CommandBars.GetImageMso(id, 32, 32)
End With
End Sub[/vb]

The result of this, as Zack points out, allows us to easily copy the control name in case it's really long:


Another interesting thing here, though, is the code. Despite moving to the Ribbon for the Office 2007 UI, Microsoft still references the commandbars objects to get the images. I found that just a little surprising, as I'd assume that they would have abandoned it all together. Go figure!

Thanks for the ideas, Zack. 😉



17 thoughts on “Office 2007 Icon Gallery

  1. This has been an invaluable tool, especially the mouse hover information. Love the add-in idea. 😉

    I have had a slightly hard time finding legacy images. I'm not sure if they were all re-configured or what. Most are there, but there are some..

  2. I forgot to add, I altered the userform attached to include a textbox, then I added a line of code to the RibbonX module..

    form.nameY.Text = id

    Of course I named the control "nameY". I did this so I could copy the name of the control id easily. Trying to remember some of these long names is agonizing.. lol

  3. Hi Digmabar,

    I've emailed you, but for anyone else, it is on the Ribbon Article Table of Contents, which you can link to in the "Main Site" links on the upper left of the page.



  4. Don't waste time to downloading the extracted icons from the link above. The quality of them is awful. Indeed, it's about 5% of them are actually usable.

  5. I agree with the above post... most of the icons are of terrible quality. I got lucky... the one I was looking for was good in the 16x16 version, which is what I happened to need... but the 32x32 versions of it were bad. Just got lucky.

  6. Here's a link to download extracted Word 2007 icons (16 and 32 pixel transparent pngs). I believe the quality is very good 🙂

  7. Ey Stephen, would you explain how you extracted the icons from Word 2007 or would you share the Excel 2007 icons?

  8. Change it to this and it will just copy the id to the clipboard ready for you to paste:

    Sub OnAction(control As IRibbonControl, id As String, index As Integer)
    If (control.Tag = "large") Then
    id = Strings.Mid(id, 3)
    End If

    Dim objDataObject As DataObject
    Set objDataObject = New DataObject
    Call objDataObject.SetText(id)
    Call objDataObject.PutInClipboard
    Set objDataObject = Nothing

    Dim form As New ControlInfoForm
    form.nameX.Caption = "imageMso: " & id
    Set form.Image1.Picture = Application.CommandBars.GetImageMso(id, 16, 16)
    Set form.Image2.Picture = Application.CommandBars.GetImageMso(id, 32, 32)
    End Sub

  9. Hi, Ken:

    I installed Office2007IconsGallery.xlam (Office menu|Excel Options|Add-ins|Go). I see Office2007IconsGallery.xlam is on the list, checked. But I don't see any ribbon tag added. (ex: develper,...) Do you know why is this?

  10. Loving the icon gallery, but I can't find the old "Paste Values" icon from Excel 2003 (or anything that looks like it could represent "Paste Values". Any idea why they removed that icon from the QAT button for the "Paste Values" command?

  11. No, can't say that I've noticed, to be honest, as it's on the right click command. (The row of funny looking paste icons has a clipboard with a 123 on it.)

  12. Pingback: PowerPoint Icon Gallery - Cool Code - Brandwares

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Latest Posts