Reputation: 287
In my add-on I can create ribbon group and add buttons to it and everything looks great while the outlook window spans the entire monitor and has enough room to display everything. However when the outlook window is resized to be very small all the buttons from the group disappear and a mini icon for the group gets displayed. This happens for all the standard ribbon groups as well mine but they all have nice small icons set for them when the group gets minified. How do i set this for my group.
Upvotes: 3
Views: 981
Reputation: 2147
If you want to use the default microsoft office icons you should give a look to the OfficeImageId
property of your ribbon button. For example I use the RefreshAll
icon here:
and the result will be something like this:
More informations about the OfficeImageId you can find in the microsoft docs. In this article you find a link to the icon gallery. Download the word file and follow the instructions, so you get a full gallery of all default office icons.
EDIT after comment
Now I got your problem - you have multiple buttons in your group. If you use the default ribbon through the designer there is no way to set the group icon.
But you can convert your current Ribbon to a xml based ribbon. You can do it if you have opened the ribbon designer and click on the ribbon. On the property window you get blue help links, which propose you to convert your ribbon to xml. In the german version it looks like this:
The next step is to follow the instructions in the comments of the new generated Ribbon.cs
.
Last thing is to customize your ribbon group in the Ribbon.xml
and add the imageMso="RefreshAll
for example.
<?xml version="1.0" encoding="UTF-8"?>
<customUI onLoad="Ribbon_Load" xmlns="http://schemas.microsoft.com/office/2006/01/customui">
<ribbon>
<tabs>
<tab idMso="TabCalendar">
<group id="GroupCalendar" label="Refreshing" imageMso="RefreshAll">
<button id="button1" imageMso="RefreshAll" onAction="Button1_Click" label="Sync List One" size="large" />
<button id="button2" imageMso="RefreshAll" onAction="Button2_Click" label="Sync List Two" size="large" />
</group>
</tab>
</tabs>
</ribbon>
</customUI>
I hope that this edit will help you.
Upvotes: 2