Outlook Banter

Outlook Banter (http://www.outlookbanter.com/)
-   Add-ins for Outlook (http://www.outlookbanter.com/add-ins-outlook/)
-   -   Toolbar problem -Help (http://www.outlookbanter.com/add-ins-outlook/49081-toolbar-problem-help.html)

lencastro May 25th 07 11:27 AM

Toolbar problem -Help
 

I'm in need to check the opened window...and i have insert toolbar
accoring to the window opened

HRESULT CKGAddIn::Invoke(DISPID dispidMember,REFIID riid,LCID lcid,
WORD wFlags,
DISPPARAMS* pDispParams, VARIANT* pvarResult,
EXCEPINFO* pExcepInfo, UINT* puArgErr)
{
if (dispidMember==0xf001)
{
if (!pDispParams)
return E_INVALIDARG;

if (pDispParams-cArgs 0)
{

ATLASSERT(m_pApp);
CComQIPtrOutlook::_InspectorspInsp;
m_pApp-ActiveInspector(&spInsp);
ATLASSERT(spInsp);----(****FAILING HERE****)
IDispatch *spItem;
spInsp-get_CurrentItem(&spItem);----(****FAILING HERE****)
ATLASSERT(spItem);
CComQIPtrOutlook::_MailItemspMailItem;
CComQIPtrOutlook::Recipients spRecipients;

BSTR bstrBody;
BSTR bstrHTMLBody;
LONG count;

spMailItem-get_Body(&bstrBody);
spMailItem-get_HTMLBody(&bstrHTMLBody);

spMailItem-get_Recipients(&spRecipients);
spRecipients-get_Count(&count);


}

}

return TRUE;
}
if count==0 then it is a compose window
This is how i planned to check,can any one tell me what is wrong with
my code...
Also tell me is there any other way to do it....

Thank you
Lencastro



All times are GMT +1. The time now is 12:25 PM.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2006 OutlookBanter.com