none
Extended UI - add custom icon RRS feed

  • Question

  • Hi there,

    I keep trying to add custom image to my ribbon. I am lazy man so I made few macros, and want them have icon with meaning. I've added the following in ExportedUI:

    image="c:\Users\??????????\Desktop\tmp\extendedUI\Tag.png"

    instead of

    imageMSO="Risks"

    But I get nothing.

    Do you know how to force it to load this icon?

    I've tried to create add-in from null with similar result. If you wish to take a look see:

    http://chomikuj.pl/MajorKaza/NOT+working

    Thanks in advance

    MajorKaza

    Monday, April 8, 2013 11:48 AM

Answers

  • As far as I know, it's not possible to provide one's own graphics for icons using the interface that targets end-users (ExportedUI). It can only be done by embedding the Ribbon XML and the images in a document or template add-in. Or by defining the Ribbon in a COM add-in, but that's not desiged to work with macros.

    So the best approach would probably be for you to use the Custom UI Editor to write Ribbon XML in a template file for the commands you want to add to the Ribbon. Use the tool it provides to get the correct method signatures for the macro (Sub()) and to import the graphics. Save this template in your Startup file to have to always available (similar to the way everything in Normal.dotm is always available).

    You can download the Custom UI Editor here:
      http://openxmldeveloper.org/blog/b/openxmldeveloper/archive/2010/08/10/23248.aspx

    There are quite a number of articles and posts on the Internet about how to use the tool.

    Information about writing Ribbon XML (which is different from that in Exported UI!) can be found in the three-part article "Customizing the 2007 Office Fluent RIbbon for Developers" here:
      http://msdn.microsoft.com/en-us/office/aa905530.aspx


    Cindy Meister, VSTO/Word MVP, my blog

    Tuesday, April 9, 2013 6:31 AM
    Moderator

All replies

  • As far as I know, it's not possible to provide one's own graphics for icons using the interface that targets end-users (ExportedUI). It can only be done by embedding the Ribbon XML and the images in a document or template add-in. Or by defining the Ribbon in a COM add-in, but that's not desiged to work with macros.

    So the best approach would probably be for you to use the Custom UI Editor to write Ribbon XML in a template file for the commands you want to add to the Ribbon. Use the tool it provides to get the correct method signatures for the macro (Sub()) and to import the graphics. Save this template in your Startup file to have to always available (similar to the way everything in Normal.dotm is always available).

    You can download the Custom UI Editor here:
      http://openxmldeveloper.org/blog/b/openxmldeveloper/archive/2010/08/10/23248.aspx

    There are quite a number of articles and posts on the Internet about how to use the tool.

    Information about writing Ribbon XML (which is different from that in Exported UI!) can be found in the three-part article "Customizing the 2007 Office Fluent RIbbon for Developers" here:
      http://msdn.microsoft.com/en-us/office/aa905530.aspx


    Cindy Meister, VSTO/Word MVP, my blog

    Tuesday, April 9, 2013 6:31 AM
    Moderator
  • you can use Ribbon XML to add custom Ribbon into your Office UI, You can get help from the Article and you also can get some snippet codes from Custom UI of Office 2010 Training Course. 

    Thanks.

    Wednesday, April 10, 2013 6:08 AM