Presentation cannot open

  • Thread starter Thread starter keralafood
  • Start date Start date
K

keralafood

i am working powerpoint automation program(c++) one simple call
failing in 2007 version of PPT
just i call Presentations open file method ,it always giving error,i
tried open2007 ,openOld methods but all are vain.
any restrictions to open presentation in 2007?any other routine
required?plz help me ..
 
i am working powerpoint automation program(c++) one simple call
failing in 2007 version of PPT
just i call Presentations open file method ,it always giving error,i
tried open2007 ,openOld methods but all are vain.
any restrictions to open presentation in 2007?any other routine
required?plz help me ..

anybody got same problem?my problem is this ,always failing open
method of presentations object in 2007 version ..plz help me..
 
thanks for reply
here is the code it is working 2003/ xp PROBLEM IN 2007 ..I DON'T
KNOW WHY THIS simple code failing..
no protection ,security also like
this ..msoAutomationSecurityForceDisable

CoInitialize(NULL);
HRESULT hr;
IUnknown *pUnk;
CLSID clsid;


hr= CLSIDFromProgID(L"PowerPoint.Application", &clsid);
if(!app.CreateDispatch(clsid))
{

hr = GetActiveObject(clsid, 0, (IUnknown**)&pUnk);

// Get IDispatch

hr = pUnk->QueryInterface(IID_IDispatch, (void **)&app);
pUnk->Release();

}
if(app)
{
app.put_Visible(true);
CPresentations Presentations = app.get_Presentations();

CPresentation pres;

LPSTR strName = "d:\\_test.pptx";



pres = Presentations.Open(strName,0,0,1);
}
 
hi i am getting strange result ,same code working some time ,failing
most of the time..(2007).
internally getting error result like this
SCODE sc = m_lpDispatch->Invoke(dwDispID, IID_NULL, 0, wFlags,
&dispparams, pvarResult, &excepInfo, &nArgErr);

returning -2147352567
i have doubt
why this call failing only 2007 version.
why this call succeeding some times.
is this installation problem ?
any help really appreciable.
 
Back
Top