HOWTO: Get Microsoft Office bitmaps for Visual Studio add-ins

Author: Carlos J. Quintero (Microsoft MVP) Applies to: Microsoft Visual Studio .NET 2002
Date: August 2008   Microsoft Visual Studio .NET 2003
Updated: March 2013   Microsoft Visual Studio 2005
      Microsoft Visual Studio 2008
      Microsoft Visual Studio 2010
      Microsoft Visual Studio 2012

When creating add-in commands calling Commands.AddNamedCommand, the 5th (boolean) parameter (MSOButton) and 6th (integer) parameter (Bitmap) of that method provide a way to specify the bitmap for the command and buttons created from it, which can be:

More Information

  • To get a visual list of the Microsoft Office bitmaps along with their indexes to use in the Bitmap parameter when the MSOButton parameter is true, Microsoft provided many years ago a handy Excel spreadsheet where you can enter a range of indexes and a command bar is created with the bitmaps in the specified range. When moving the mouse over a bitmap, a tooltip appears with its index. That Excel spreadsheet is no longer available on the Microsoft website but you can download it from here.

    Disclaimer: this Excel spreadsheet is provided with no warranties. Use it at your own risk.

    • Enter a small range of indexes because otherwise it can take long time to display the commmandbar.
    • In Microsoft Excel 2007, you have to switch to the Add-Ins tab in the ribbon to see the custom commandbar.
  • To get a visual list of the Microsoft Office 2007 bitmaps that you can capture to use in a satellite DLL when the MSOButton parameter is false, see:

    2007 Office System Add-In: Icons Gallery

    Additionally, Visual Studio 2005 and higher provide a file with their own bitmaps resources in the following folders:
    • For Visual Studio 2005: C:\Program Files\Microsoft Visual Studio 8\Common7\VS2005ImageLibrary
    • For Visual Studio 2008: C:\Program Files\Microsoft Visual Studio 9.0\Common7\VS2008ImageLibrary
    • For Visual Studio 2010: C:\Program Files\Microsoft Visual Studio 10.0\Common7\VS2010ImageLibrary
    • For Visual Studio 2012: http://www.microsoft.com/en-us/download/details.aspx?id=35825

Go to the 'Visual Studio Extensibility (VSX)' web site for more articles like this (Articles section)