Click here to Skip to main content
15,913,027 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Timed Updation Pin
Prakash Nadar11-Feb-04 0:27
Prakash Nadar11-Feb-04 0:27 
GeneralRe: Timed Updation Pin
Monty211-Feb-04 0:35
Monty211-Feb-04 0:35 
GeneralRe: Timed Updation Pin
Prakash Nadar11-Feb-04 0:41
Prakash Nadar11-Feb-04 0:41 
GeneralRe: Timed Updation Pin
jmkhael11-Feb-04 0:42
jmkhael11-Feb-04 0:42 
QuestionCan do that??? Pin
don7cry10-Feb-04 21:04
don7cry10-Feb-04 21:04 
AnswerRe: Can do that??? Pin
Antti Keskinen10-Feb-04 22:02
Antti Keskinen10-Feb-04 22:02 
GeneralInsert ActiveX wizard trouble Pin
El'Cachubrey10-Feb-04 20:58
El'Cachubrey10-Feb-04 20:58 
GeneralAutomating Outlook Pin
ctbmei10-Feb-04 20:13
ctbmei10-Feb-04 20:13 
I am trying to automate Outlook using Visual C++. Here is what I am trying to do:



void CTestOutlookDoc::OnFileTest()
{
Outlook::CApplication pApp;
COleException e;
if (!pApp.CreateDispatch(_T("Outlook.Application")))
{
CString str;
str.Format("CreateDispatch() failed w/error 0x%08lx", e.m_sc);
AfxMessageBox(str, MB_SETFOREGROUND);
return;
}
pApp.m_bAutoRelease = TRUE;
pApp.Quit();

return;
}

When the code is executed, an instance of Outlook is created. However, even I call Quit() in my code, OUTLOOK.EXE still remains in Windows Task Manager after the program is quit. What should I do in order to kill the OUTLOOK process when I call Quit() in my function?

In DavidCrow's reply, he said OUTLOOK just goes after the code is executed. However, I tried the same piece of code in several computers, but OUTLOOK still remains in my Windows Task Manager after the code is executed. To make it worse, the code cannot create another instance of OUTLOOK unless I manually take out OUTLOOK from Windows Task Manager. Also, if Word (or Excel) is being used instead of Outlook, the code is working and Word (or Excel) is closed after the code is finished.

Does anyone have any idea what to do? Or does anyone have a sample program that starts Outlook, send an email and then quit?

Regards,
CTBMei


GeneralRe: Automating Outlook Pin
jmkhael11-Feb-04 0:37
jmkhael11-Feb-04 0:37 
GeneralDynamic display of MSChart Pin
vidyaby10-Feb-04 19:55
vidyaby10-Feb-04 19:55 
GeneralMemory usage for SetWindowText Pin
Coremn10-Feb-04 19:38
Coremn10-Feb-04 19:38 
GeneralArray of Objects of a class Pin
Member 38437310-Feb-04 18:16
Member 38437310-Feb-04 18:16 
GeneralRe: Array of Objects of a class Pin
Maxwell Chen10-Feb-04 19:39
Maxwell Chen10-Feb-04 19:39 
GeneralRe: Array of Objects of a class Pin
Member 38437310-Feb-04 21:54
Member 38437310-Feb-04 21:54 
GeneralRe: Array of Objects of a class Pin
Antti Keskinen10-Feb-04 23:37
Antti Keskinen10-Feb-04 23:37 
GeneralRe: Array of Objects of a class Pin
Member 38437311-Feb-04 20:10
Member 38437311-Feb-04 20:10 
GeneralObject ID's dont appear in Class Wizard Pin
SJS_OZ10-Feb-04 18:09
SJS_OZ10-Feb-04 18:09 
Generalweb browser customization Pin
Abhi Lahare10-Feb-04 18:05
Abhi Lahare10-Feb-04 18:05 
GeneralRunning VBscript Pin
pranavamhari10-Feb-04 17:21
pranavamhari10-Feb-04 17:21 
GeneralRe: Running VBscript Pin
Ryan Binns10-Feb-04 17:56
Ryan Binns10-Feb-04 17:56 
GeneralVERSIONINFO in program Pin
shultas10-Feb-04 16:09
shultas10-Feb-04 16:09 
GeneralRe: VERSIONINFO in program Pin
pranavamhari10-Feb-04 17:26
pranavamhari10-Feb-04 17:26 
Generalmax controls on a dialog using vc++ Pin
burnafatty10-Feb-04 14:17
burnafatty10-Feb-04 14:17 
GeneralRe: max controls on a dialog using vc++ Pin
John R. Shaw10-Feb-04 14:48
John R. Shaw10-Feb-04 14:48 
GeneralRe: max controls on a dialog using vc++ Pin
Christian Graus10-Feb-04 15:49
protectorChristian Graus10-Feb-04 15:49 

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.