R
RAHUL
Hi All,
In my C++ application I try to connect to PowerPoint (using the below
mentioned source code) and then ask it to open a PPT file, I also
allow the user to save the file being edited and at that time also I
retrieve the PowerPoint object using the same calls and then call a
activePresentation.Save().
But with a particular version of PowerPoint (11.8169.8172) the save
fails with an "RunTime error (NO active presentation found)"
When this error happens I could see 2 instances of POWERPNT.exe in
task manager, this problem does not happen on my other machine which
has 11.8307.8221 and there only one instance of POWERPNT.exe runs at
any point of time.
I wanted to know, why is the second instance of POWERPNT.exe created
while one is already running and what could be the triggering point
for this?
Any help or pointers are greatly appreciated.
Thanks in advance
Rahul
CLSID clsid;
hr = CLSIDFromProgID(L"PowerPoint.Application", &clsid);
if(SUCCEEDED(hr))
{
IUnknown * pUnk = NULL;
hr = ::GetActiveObject(clsid, NULL, (IUnknown**)&pUnk);
if(SUCCEEDED(hr))
{
IDispatch * pPPApp = NULL;
hr = pUnk->QueryInterface(IID_IDispatch, (void **)&pPPApp);
// ........... some other code
In my C++ application I try to connect to PowerPoint (using the below
mentioned source code) and then ask it to open a PPT file, I also
allow the user to save the file being edited and at that time also I
retrieve the PowerPoint object using the same calls and then call a
activePresentation.Save().
But with a particular version of PowerPoint (11.8169.8172) the save
fails with an "RunTime error (NO active presentation found)"
When this error happens I could see 2 instances of POWERPNT.exe in
task manager, this problem does not happen on my other machine which
has 11.8307.8221 and there only one instance of POWERPNT.exe runs at
any point of time.
I wanted to know, why is the second instance of POWERPNT.exe created
while one is already running and what could be the triggering point
for this?
Any help or pointers are greatly appreciated.
Thanks in advance
Rahul
CLSID clsid;
hr = CLSIDFromProgID(L"PowerPoint.Application", &clsid);
if(SUCCEEDED(hr))
{
IUnknown * pUnk = NULL;
hr = ::GetActiveObject(clsid, NULL, (IUnknown**)&pUnk);
if(SUCCEEDED(hr))
{
IDispatch * pPPApp = NULL;
hr = pUnk->QueryInterface(IID_IDispatch, (void **)&pPPApp);
// ........... some other code