CommandBar related functionality is shared by all Office apps. The type
library you need is MSO.DLL
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
thanks a lot.
I managed to get the button.
but now I have another problem.
I'm trying to create a new appointment and to display it.
CComPtr<Outlook::_AppointmentItem> appt;
COleVariant v1;
v1.iVal = 1;
v1.vt = VT_I4;
hr = m_pApp.CoCreateInstance(__uuidof(Outlook::Application), NULL,
CLSCTX_SERVER);
m_pApp->CreateItem(Outlook::olAppointmentItem, (IDispatch**)&appt);
appt->Display(v1);
the error occured when I created the appointment and it says that the
function CreateItem doesn't take 2 parameters whereas when I write the
name of the function to see the parameters, it shows me it takes 2.
I don't understand.......
Dmitry Streblechenko - 21 Jun 2005 22:55 GMT
Can't help you with thaa, sorry - I don't use C++.
Did you try to use only one parameter and assign the CreateItem function
result to the appt variable?
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
> thanks a lot.
>
[quoted text clipped - 19 lines]
>
> I don't understand.......
cyan21 - 22 Jun 2005 10:02 GMT
Yes I tried it but the CreateItem function returns a HRESULT type and
not a IDispatch type.
if someone find a solution, let me hear it. I'll post here if I find
one.
cyan21 - 22 Jun 2005 16:05 GMT
I figured it out, I replaced CreateItem by raw_CreateItem function.