Consulting

Results 1 to 6 of 6

Thread: Solved: Put special character on a button?

  1. #1
    VBAX Mentor clhare's Avatar
    Joined
    Mar 2005
    Posts
    470
    Location

    Solved: Put special character on a button?

    Is it possible to put special characters and symbols on a button in the 2010 ribbon using the Custom UI Editor? For example, I'd like to put a division symbol, a less than or equal to symbol, and a greater than or equal to symbol on buttons.

    Thanks!

    Cheryl

  2. #2
    VBAX Sage
    Joined
    Apr 2007
    Location
    United States
    Posts
    8,711
    Location
    You can put your own PNG file on the ribbon with the CustomUI editor:

    Insert Icons and browse, or the little 'Mountain/Moon' icon

    To use your own image, use 'image=MyPic' and not 'imageMso=FileOpen'

    [vba]
    <button id="bDarkGray"
    label="Dark Gray"
    showLabel="false"
    onAction="modCallbacks.ShadePressed"
    image="DarkGray"
    screentip="Shade selected cells Dark Gray"
    />
    [/vba]

    Also there's many sites with free and very good PNG files to use

    http://www.iconarchive.com/


    Paul
    Attached Images Attached Images

  3. #3
    VBAX Mentor clhare's Avatar
    Joined
    Mar 2005
    Posts
    470
    Location
    I tried using SnagIt to capture the images I created in Word 2003 as .png files (I don't have PhotoShop), but the quality in 2010 was not good. I was hoping there was a way to use ASCII codes or something. Oh well...

    Cheryl

  4. #4
    VBAX Sage
    Joined
    Apr 2007
    Location
    United States
    Posts
    8,711
    Location
    http://www.iconarchive.com/show/blue...-icojam.2.html

    There's plus, minus, times, etc. + other characters

    might search for pre-made PNG's in the site, many, many, many choices

    Also the freeware Paint.net will make PNGs, but that's too much work for me

    Easier to use a pre-made PNG

    Paul

  5. #5
    VBAX Master
    Joined
    Feb 2011
    Posts
    1,480
    Location
    I agree with using a pre-made PNG. You can also look up GIMP, which is a shareware program that lets you recreate some symbols (I needed to do this).

    But check out
    http://www.microsoft.com/en-us/downl....aspx?id=21103

    That's a list of all the built-in Microsoft Office control graphics that are available to you if you use imageMso within the CustomUI editor.

    That's even easier than loading custom graphics into your project.

    Also, note that you may need to versions of any custom graphics: a 16x16 version and a 32x32 version (if it's going on a large button).

  6. #6
    VBAX Mentor clhare's Avatar
    Joined
    Mar 2005
    Posts
    470
    Location
    All the icon images I want in 2010 are on custom toolbar buttons I had previously created in Word 2003. I finally got them on the 2010 ribbon, but it took quite awhile to figure out. Here's what I did:

    -- I copied the icon from my toolbar button in Word 2003 and pasted it in Paint (as per one of Greg Maxey's demos at http://gregmaxey.mvps.org/word_tip_p...tom_icons.html).

    -- Once in Paint, I verified the icon was 16x16 pixels using Image > Attributes (for a small button) and then saved it as a .png file.

    -- Next I had to email the file to myself so I could open it in Gimp on my Mac (I have Paint on my work PC and Gimp on my Mac).

    -- I opened the image in Gimp and zoomed to 800%.

    -- I used the Fuzzy Select tool and clicked in a background area and then selected Edit > Clear to remove the background.

    -- Once all background areas in the image were removed, I resaved the file and then exported it as a .png.

    -- Next I had to email the updated .png file back to myself to get it on my work PC again.

    -- Once back on my PC, I added the image to the Custom UI Editor file and it's on the ribbon looking just as it did in Word 2003 except with a transparent background!

    Alot of trial and error, but this finally worked. Whew!

    Cheryl

Posting Permissions

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