Pregunta

I have a custom button in outlook and I have to add image icon for the same button.

Ribbon XML is:

<button id="GoToAppConfiguration" 
    label="Application Configuration" 
    getImage="GetCustomImage" 
    onAction="GoToAppConfigurationClicked" 
    size="normal" />

I want to write ribbon callback method but how do I write the same and how do I use an image stored in a Resource folder under the Addin project.

¿Fue útil?

Solución

You just need to return a Bitmap from GetCustomImage. Here is a c# example, assuming you have added the BMP to your Project Resources.

public Bitmap GetCustomImage(Office.IRibbonControl control)
{
    return Properties.Resources.btnAppConfiguration_Image; // resource Bitmap
}
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top