How to change the icons on custom toolbar buttons

I've blogged previously about how to create a new toolbar button that runs a macro you've written. Another neat trick about this is to change the icon on this custom toolbar button to be more relevant. I have custom macros to do things such as:

  • Create a task from the selected emails
  • Move mails to my "Blog Comments" folder (.Text emails them to me), which just looks for keywords in the subject for mails/comments
  • Schedule a meeting with the recipients of the selected email (I need to polish this one up before blogging it)

I assigned custom icons to these macros as follows:

   

How to add a custom icon via the UI

Option 1: Use one of the default custom buttons
(Which is what I did for the icon for "Move to Blog")
1. Right click on the toolbar and choose Customize
2. Right click on the button whose icon you want to change
3. Click on Change Button Image and select one of those options

Option 2: Copy an icon from a different button
(This is what I did for my "Create Task" and "Sched Mtg" buttons):
1. Go to the folder with the toolbar whose icon you want to copy
2. Right click on that button and choose Customize
3. Right click on that button again and choose Copy Button Image
4. Go to the folder with your custom button
5. Right click on that button and choose Customize
6. Right click on that button and choose Paste Button Image

Option 3: Create your own icon with an icon editor
1. Right click on the button whose icon you want to change and choose Customize
2. Right click on that button again and choose Edit Button Image

Option 4: Add a custom icon programmatically
I'll leave this one to the experts from the VSTO blog: Add an image to a button by using the system clipboard

You may not want to use the clipboard because it overwrites what the user has on it already (which is also what Outlook does in Option 2 above), so here's another option: Add an image to a button without using the system clipboard