如何为我的功能区获取一些 mso 图标的全名?

How to get the full name of some mso icon for my ribbon?

我正在寻找要放在功能区上的特定图标。 我在网上找到了列表'Microsoft-Office-2010-imageMso-Gallery.pdf',但是有些图标的名字在最后被截断了。例如,我想要这个:ConditionalFormattingHighlightTextC,它指的是'Conditional Formatting Highlight Text That Contains'。我也尝试用 Contain、Contains 和 Cells 来完成名称,但没有成功,因为我的功能区仍然没有图标。 知道在哪里寻找! JLuc01

您可以尝试在 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 中搜索 idMso 值。

然后您可以使用 CommandBars.GetImageMso 方法,其中 returns 由 idMso 参数标识的控制图像的 IPictureDisp 对象缩放到由 width 和高度。宽度和高度参数必须介于 16 和 128 之间。例如,以下示例 returns 32x32 版本的粘贴图标作为 IPictureDisp 对象:

Application.CommandBars.GetImageMso("Paste", 32, 32)