Unable to load Image in Outlook 2007 Ribbon Control

K

KarthikonIT

Hi,
I m creating a plugin in MS Outlook.
I have implemented the "_IDTExtensibility2" & "IRibbonExtensibility"


I have added button to MS Outlook Ribbon control, but the Image that i m
trying to load is not
Visible. MS OUtlook is not calling the call back function "GetItemIcon".

But it is calling the ButtonClicked event when the Button is clicked.



This is the XML returned to Outlook when the plugin is loaded.


STDMETHOD(GetCustomUI)(BSTR RibbonID, BSTR * RibbonXml)
{
if (!RibbonXml)
return E_POINTER;




);


*RibbonXml = SysAllocString(
L"<customUI xmlns=\"
http://schemas.microsoft.com/office/2006/01/customui\""
L" onLoad=\"GetRibbonXControl\""
L" loadImage=\"GetItemIcon\">"
L" <ribbon>"
L" <tabs>"
L" <tab idMso=\"TabReadMessage\""
L" label=\"Custom Tab\">"
L" <group id=\"Test\""
L" label=\"Custom Group\">"
L" <button id=\"CustomButton1\""
L" image=\"AGIcon.bmp\""
L" size=\"large\""
L" label=\"Sample Button!\""
L" visible=\"true\""
L" onAction=\"ButtonClicked\"/>"
L" </group>"
L" </tab>"
L" </tabs>"
L" </ribbon>"
L"</customUI>"
);

return (*RibbonXml ? S_OK : E_OUTOFMEMORY);

}


STDMETHOD(GetItemIcon)(IDispatch * RibbonControl)
{

::MessageBox(NULL,"Load Img","Sample",MB_OK);
return S_OK;
}



Any clues?

Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top