Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Outlook / Programming Add-Ins / June 2005

Tip: Looking for answers? Try searching our database.

Push Receive/Send button

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
cyan21 - 20 Jun 2005 12:02 GMT
hello,

I'd like to launch the reception of mails by code but I don't know how
to access to the button Receive/Send.

I used a class Wizard to extract type from the Outlook typelib but
there is no class for CommandBar.

So how do you do to access it ?

thank in advance

yann.
Dmitry Streblechenko - 20 Jun 2005 18:42 GMT
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

> hello,
>
[quoted text clipped - 9 lines]
>
> yann.
cyan21 - 21 Jun 2005 16:06 GMT
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.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.