Results 1 to 5 of 5
  1. #1
    2 Star Lounger
    Join Date
    Jan 2004
    Location
    Mount Prospect, Illinois
    Posts
    142
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Custom icons for built-in commands in 2007 (2007)

    I'm trying to customize the 2007 ribbon using the customUI.xml file, and making good strides except for one thing:
    My XML is attempting to add useful commands to the ribbon which don't have icons. So if I use the default, no icon appears. But if I use the image="myIcon" for an image I know is loaded (because I can assign it to a button not for a built-in), it still doesn't appear.

    Examples:
    <button idMso="ParagraphReset" visible="true" /> -- shows no icon
    <button idMso="ParagraphReset" visible="true" image="ResetPara" /> -- shows no icon
    <button id="My.ParagraphReset" visible="true" image="ResetPara"/> -- shows the icon

    Will work for clues

  2. #2
    Administrator
    Join Date
    Mar 2001
    Location
    St Louis, Missouri, USA
    Posts
    23,594
    Thanks
    5
    Thanked 1,059 Times in 928 Posts

    Re: Custom icons for built-in commands in 2007 (2007)

    Joe

  3. #3
    2 Star Lounger
    Join Date
    Jan 2004
    Location
    Mount Prospect, Illinois
    Posts
    142
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Custom icons for built-in commands in 2007 (2007)

    I've been through the first, no help.
    The second I can't seem to get to right now - site problems?

    In any case, I've found some nasty workarounds, requiring callbacks to my template which then execute the built-in functionality, but at least its a single set of callbacks (for Execute, ScreenTip, SuperTip, Pressed, Enabled, etc.) for all the built-ins.

    This sounds like it's a typical Microsoft short-sightedness, not permitting you to change the icon of a built-in, so that commands always look the same, but if there's no pic, you should have the chance to change it.

  4. #4
    Lounger
    Join Date
    Oct 2004
    Location
    Indianapolis, Indiana, USA
    Posts
    45
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Custom icons for built-in commands in 2007 (2007)

    Don't know if this'll help. I'm just now trying to figure our Ribbons customizations.

    The few examples I've seen have a little something that your example doesn't.
    If you're use a custom image, the examples I see all use the file extension: <button image="MyButtonImage.bmp" . . . />
    If you're using a built-in button image (and maybe finding a good one may make your life easier), examples use the imageMso: <button imageMso="TableDrawTable" . . . /> Notice the lack of file extension

    Bonus points to anyone who creates a macro that lists the imageMso IDs of all the built-in icons and shows the corresponding image in a printable file.

    Another possibility, and again I don't know whether this will work. But can you hide the original button, and then create a whole new custom button that calls the original action. Maybe something like this(?):
    <button idMso="ParagraphReset" visible="false" />
    <button id="My.ParagraphReset" image="ResetPara(.bmp?)" onAction="ParagraphReset" />

  5. #5
    Lounger
    Join Date
    Oct 2004
    Location
    Indianapolis, Indiana, USA
    Posts
    45
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Custom icons for built-in commands in 2007 (2007)

    As a follow-up to my own post, see <post#=706115>post 706115</post#> for a link to an Excel add-in that shows all icons and IdMso values.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •