I am currently creating a Outlook Add-in and need to include the Outlook Catagorize Menu to my add-in. With this Foreach I´m Creating and adding the Buttons manually into the "Kategorisieren"-RibbonMenu and naming them the same as the catagory names. Now I´m trying to copy the color-images of the categories to the button Image which works by assigning them with the right OfficeImageId. Nevertheless there are some catagories which colors are not described as OfficeImageIds, but rather like objects f. e. the color peach as an object of OlCategoryColor.OlCategoryColorPeach . The Problem is that I cant use them as the others by assigning them to the button.Image or OfficeImageId. How do I get these little Icons in the right Color next to my buttons.
The next Task would be assigning the Category to the Appointment by clicking on the right button.
Categories categories = Globals.TerminAddIn.Application.Session.Categories;
foreach (Category category in categories)
{
var button = this.Factory.CreateRibbonButton();
this.Kategorisieren.Items.Add(button);
button.Label = category.Name;
}
this.Kategorisieren.ControlSize = RibbonControlSize.RibbonControlSizeLarge;
this.Kategorisieren.OfficeImageId = "CategorizeMenu";
this.Kategorisieren.ShowImage = true;