I am looking for a specific icon I want to put on my ribbon. I found the list 'Microsoft-Office-2010-imageMso-Gallery.pdf' online, but the names of some icon are cut at the end. For example, I wanted this one: ConditionalFormattingHighlightTextC, which refer to 'Conditional Formatting Highlight Text That Contains'. I tried to finish the name with the word Contain, Contains and Cells as well, but without success as my ribbon remain without icon. Any idea where to look for! JLuc01
CodePudding user response:
You can try searching for the idMso
value in the Office 2010 Add-In: Icons Gallery. Also you may take a look at the ribbon control IDs in the Office 2016 Help Files: Office Fluent User Interface Control Identifiers .
Then you can use the CommandBars.GetImageMso method which returns an IPictureDisp
object of the control image identified by the idMso
parameter scaled to the dimensions specified by width and height. The Width and Height parameters must be between 16 and 128. For example, the following sample returns a 32x32 version of the Paste icon as an IPictureDisp
object:
Application.CommandBars.GetImageMso("Paste", 32, 32)