I am attempting to make a dropdown command menu without icons in a word add in. Currently, following the documentation, I have the dropdown working, but when I try to remove the elements, which are not a required feature, I get default broken image icon.
Is there a way to have a dropdown command menu without any icons and just text for each subitem?
<Control xsi:type="Menu" id="Contoso.Menu2">
<Label resid="Contoso.Menu.Label" />
<Supertip>
<Title resid="Contoso.Menu.Label" />
<Description resid="Contoso.Menu.Tooltip" />
</Supertip>
<Icon>
<bt:Image size="16" resid="Icon.16x16" />
<bt:Image size="32" resid="Icon.32x32" />
<bt:Image size="80" resid="Icon.80x80" />
</Icon>
<Items>
<Item id="itemShowTaskPane2">
<Label resid="Contoso.Item1.Label"/>
<Supertip>
<Title resid="Contoso.Item1.Label" />
<Description resid="Contoso.Item1.Tooltip" />
</Supertip>
<Icon>
<bt:Image size="16" resid="Icon.16x16" />
<bt:Image size="32" resid="Icon.32x32" />
<bt:Image size="80" resid="Icon.80x80" />
</Icon>
<Action xsi:type="ShowTaskpane">
<TaskpaneId>ButtonId1</TaskpaneId>
<SourceLocation resid="Contoso.Taskpane.Url" />
</Action>
</Item>
<Item id="itemExecuteFunction2">
<Label resid="Contoso.Item2.Label"/>
<Supertip>
<Title resid="Contoso.Item2.Label" />
<Description resid="Contoso.Item2.Tooltip" />
</Supertip>
<Icon>
<bt:Image size="16" resid="Icon.16x16" />
<bt:Image size="32" resid="Icon.32x32" />
<bt:Image size="80" resid="Icon.80x80" />
</Icon>
<Action xsi:type="ExecuteFunction">
<FunctionName>writeValue</FunctionName>
</Action>
</Item>
</Items>
</Control>
You must have the icon files. That is a requirement. But an image file can consist entirely of transparent pixels. This would have the effect of making it appear that there is no icon. The area where the icon is will have the color of the ribbon in the background, which would depend on what mode/theme the user has set. E.g., dark mode, light mode, etc.
An example of how to create a transparent image: https://www.techwalla.com/articles/how-to-make-a-picture-transparent-in-paint