P
Peter Carlson
Using the following C++ (Non-MFC) code POWERPOINT.EXE keeps running even
after the quit. Any ideas as to why?
CComPtr<PowerPoint::_Application> app;
if (app.CoCreateInstance(L"Powerpoint.Application", NULL,
CLSCTX_LOCAL_SERVER) == S_OK) {
PowerPoint:resentations *Presentations;
app->get_Presentations(&Presentations);
PowerPoint::_Presentation *Presentation;
CComBSTR bstrFile("c:\\projects\\ppt_test\\12345");
Presentations->Open(bstrFile+_T(".ppt"), Office::msoFalse,
Office::msoTrue, Office::msoFalse, &Presentation);
Presentation->SaveAs(bstrFile, PowerPoint:pSaveAsMetaFile,
Office::msoFalse);
app->Quit();
}
Peter
after the quit. Any ideas as to why?
CComPtr<PowerPoint::_Application> app;
if (app.CoCreateInstance(L"Powerpoint.Application", NULL,
CLSCTX_LOCAL_SERVER) == S_OK) {
PowerPoint:resentations *Presentations;
app->get_Presentations(&Presentations);
PowerPoint::_Presentation *Presentation;
CComBSTR bstrFile("c:\\projects\\ppt_test\\12345");
Presentations->Open(bstrFile+_T(".ppt"), Office::msoFalse,
Office::msoTrue, Office::msoFalse, &Presentation);
Presentation->SaveAs(bstrFile, PowerPoint:pSaveAsMetaFile,
Office::msoFalse);
app->Quit();
}
Peter