locked
Custom Image on Outlook 2010 Ribbon Button RRS feed

  • Question

  • Hi,

    I am writing an addin in C++ for OL2010. Can anyone tell me how to get custom image on Outlook ribbon button. We can easily get inbuilt icons on to the button. How to add custom icons?

    Thanks!

    AK
    -AK
    Friday, August 12, 2011 9:51 PM

Answers

  • The button manifest must specify the image callback (getImage="NameOfTheCallback").

    Your implementation of the callback (which takes 1 IDispatch parameter (RibbonControl)) must return an IPicture object - use LoadImage to load your icon, then call OleCreatePictureIndirect().


    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been

    • Marked as answer by akulka0 Sunday, August 14, 2011 7:57 AM
    Friday, August 12, 2011 10:02 PM

All replies

  • The button manifest must specify the image callback (getImage="NameOfTheCallback").

    Your implementation of the callback (which takes 1 IDispatch parameter (RibbonControl)) must return an IPicture object - use LoadImage to load your icon, then call OleCreatePictureIndirect().


    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been

    • Marked as answer by akulka0 Sunday, August 14, 2011 7:57 AM
    Friday, August 12, 2011 10:02 PM
  • Thanks a lot Dmitry!!! It worked !!! :)
    -AK
    Sunday, August 14, 2011 7:57 AM