PC Review Forums Newsgroups Microsoft Outlook Microsoft Outlook Program Addins Toolbar problem

Reply

Toolbar problem

 
Thread Tools Rate Thread
Old 25-05-2007, 11:17 AM   #1
lencastro
Guest
 
Posts: n/a
Default Toolbar problem


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


HRESULT CTestAddIn::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);
CComQIPtrspInsp;
m_pApp->ActiveInspector(&spInsp);
ATLASSERT(spInsp);---------------------------------------------
(Failing here(run time)
IDispatch *spItem;
spInsp-
>get_CurrentItem(&spItem);---------------------------------------------

(Failing here(run time))
ATLASSERT(spItem);
CComQIPtrspMailItem;
CComQIPtr 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

  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off