Adding an icon to a ribbon command button

S

spnz

Hi there,

I am just learning at the moment how to create custom ribbons for Word 2007.
I have managed to sort out how to make a new ribbon and also the groups with
the ribbon.

I have been given the task to move some macros over from 2000 into 2007. The
company would like to keep all the old icons as it will make it easier for
the users to get used to the new look of 2007.

<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui">
<ribbon>
<tabs>
<tab id="CustomTab" label="My Tab">
<group id="SampleGroup" label="Sample Group">
<button id="Button" label="Insert Company Name" size="large"
onAction="ThisDocument.InsertCompanyName" />
</group>
<group id="SampleGroup2" label="Sample Group 2" />
</tab>
</tabs>
</ribbon>
</customUI>


Thanks for your help!!
This is the XML I am using for the custom ribbon.

How do I display an icon with each of the new command buttons added to my
custom ribbon?
 
X

XL-Dennis

C

Cindy M.

Hi =?Utf-8?B?c3Bueg==?=,
How do I display an icon with each of the new command buttons added to my
custom ribbon?
See this set of articles (esp. Part I, with respect to your question)

http://msdn.microsoft.com/office/tool/ribbon/default.aspx

Also, read the articles in the blog at pschmid.net

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :)
 
L

Lieth

XL-Dennis said:
spnz,

You can check out the following article I recently posted at Daily Dose of
Excel which gives You the 'framework' for it (see the NotesRibbon.xml):
http://www.dailydoseofexcel.com/arc...i-for-excel-2007-with-com-add-ins-classic-vb/

When it comes to the built-in images I'm not sure if it exist a tool
retrieve the names for them or not . However for Excel 2007 You can download
and use Mike Alexanders tool Excel 2007 Custom UI Builder:
http://www.datapigtechnologies.com/freeware.htm

To get hold of the build in images you just have to specify the attribute
imageMso="" for the button. The name of the image is the same as the name of
the control, which can be found by moving the mouse over the name of the
control in the customize tab.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top