View Single Post
  #1  
Old December 25th 09, 03:23 PM posted to microsoft.public.outlook.program_addins
KarthikonIT
external usenet poster
 
Posts: 2
Default Unable to load Image in Outlook 2007 Ribbon Control

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.

--
Message posted via http://www.officekb.com

Ads