Click here to Skip to main content
15,895,011 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Problem while using Windows Registry Pin
Mark Salsbery1-Mar-07 18:58
Mark Salsbery1-Mar-07 18:58 
GeneralRe: Problem while using Windows Registry Pin
harsh_29611-Mar-07 19:43
harsh_29611-Mar-07 19:43 
AnswerRe: Problem while using Windows Registry Pin
prasad_som1-Mar-07 18:58
prasad_som1-Mar-07 18:58 
AnswerRe: Problem while using Windows Registry Pin
ThatsAlok1-Mar-07 20:31
ThatsAlok1-Mar-07 20:31 
GeneralRe: Problem while using Windows Registry Pin
harsh_29611-Mar-07 19:43
harsh_29611-Mar-07 19:43 
GeneralRe: Problem while using Windows Registry Pin
Hamid_RT1-Mar-07 20:36
Hamid_RT1-Mar-07 20:36 
GeneralRe: Problem while using Windows Registry Pin
ThatsAlok1-Mar-07 21:21
ThatsAlok1-Mar-07 21:21 
QuestionHow to get body of new arrived mail? Pin
Shashi Shinde1-Mar-07 18:36
Shashi Shinde1-Mar-07 18:36 
Hello friends!

I want to get body of new arrived mail. I'm the beginner. I had tried to get the same by using OnNewMail event. I'm not able to get the body of new mail. But it prompts me whenever new mail arrives.

Here is my code -

void __stdcall CAddin::OnNewMail()
{
MessageBox(NULL,"New Mail Arrived","Success",0);
CComQIPtr<outlook::_application>Application;
CComPtr<outlook::_explorer>Explorer;
Application =m_Application;
Explorer =Application->ActiveExplorer();
CComQIPtr<outlook ::_inspector=""> spInspector;
IDispatch *CurrentItem;
HRESULT hr1 = spInspector->get_CurrentItem (&CurrentItem);
if (FAILED (hr1))
MessageBox(NULL,"get_CurrentItem","ERROR",0);

CComPtr<outlook::_mailitem> MailItem;
MailItem=reinterpret_cast<outlook::_mailitem*>(CurrentItem);
BSTR strbodyofmail;
MailItem->get_Body (&strbodyofmail);

MessageBox (NULL, _com_util::ConvertBSTRToString(strbodyofmail),"Body of mail",0);
}

Is there any another way to get the body of new arrived mail?
I appreciate your immediate help.

Thanks & regards,

Shashi


Shashikant Shinde

GeneralRe: How to get body of new arrived mail? Pin
Programm3r1-Mar-07 20:25
Programm3r1-Mar-07 20:25 
GeneralPlease fix your reply[OT] Pin
prasad_som1-Mar-07 20:21
prasad_som1-Mar-07 20:21 
QuestionRe: How to get body of new arrived mail? [modified] Pin
Programm3r1-Mar-07 20:27
Programm3r1-Mar-07 20:27 
AnswerRe: How to get body of new arrived mail? Pin
Shashi Shinde1-Mar-07 20:55
Shashi Shinde1-Mar-07 20:55 
GeneralRe: How to get body of new arrived mail? Pin
Programm3r1-Mar-07 21:00
Programm3r1-Mar-07 21:00 
GeneralRe: How to get body of new arrived mail? Pin
Shashi Shinde1-Mar-07 22:14
Shashi Shinde1-Mar-07 22:14 
GeneralRe: How to get body of new arrived mail? Pin
Programm3r1-Mar-07 22:34
Programm3r1-Mar-07 22:34 
GeneralRe: How to get body of new arrived mail? Pin
Shashi Shinde2-Mar-07 2:50
Shashi Shinde2-Mar-07 2:50 
Questionsizeof() Operator Pin
Bulky Fellow1-Mar-07 18:30
Bulky Fellow1-Mar-07 18:30 
AnswerRe: sizeof() Operator [modified] Pin
Naveen1-Mar-07 19:07
Naveen1-Mar-07 19:07 
AnswerRe: sizeof() Operator Pin
Mark Salsbery1-Mar-07 19:10
Mark Salsbery1-Mar-07 19:10 
QuestionMore problem Pin
Kiethnt1-Mar-07 17:28
Kiethnt1-Mar-07 17:28 
AnswerRe: More problem Pin
Hamid_RT1-Mar-07 17:56
Hamid_RT1-Mar-07 17:56 
AnswerRe: More problem Pin
John R. Shaw2-Mar-07 21:39
John R. Shaw2-Mar-07 21:39 
Questioncomplete Pin
Kiethnt1-Mar-07 17:25
Kiethnt1-Mar-07 17:25 
AnswerRe: complete Pin
Cedric Moonen1-Mar-07 20:05
Cedric Moonen1-Mar-07 20:05 
QuestionC++ to DSP Pin
apoc831-Mar-07 14:28
apoc831-Mar-07 14:28 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.