If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Presentation cannot open
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 .. |
#2
|
|||
|
|||
Presentation cannot open
On Jun 24, 10:50 am, wrote:
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.. |
#3
|
|||
|
|||
Presentation cannot open
In article ,
wrote: On Jun 24, 10:50 am, wrote: 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.. Are these presentations password protected, possibly? That would cause a failure. Try opening them manually in PPT to see if you get a password request dialog box. If that's not the problem, post some example code here. Most of us use VBA but there are a few C++ literate people who might be able to spot the problem. ----------------------------------------- Steve Rindsberg, PPT MVP PPT FAQ: www.pptfaq.com PPTools: www.pptools.com ================================================ |
#4
|
|||
|
|||
Presentation cannot open
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); } |
#5
|
|||
|
|||
Presentation cannot open
In article ,
wrote: 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); } Thanks ... also, what's the exact error message and on what line does it occur? ----------------------------------------- Steve Rindsberg, PPT MVP PPT FAQ: www.pptfaq.com PPTools: www.pptools.com ================================================ |
#6
|
|||
|
|||
Presentation cannot open
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. |
#7
|
|||
|
|||
Presentation cannot open
In article ,
wrote: 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. I was hoping someone would be along to answer this; I don't have any suggestions I'm afraid. ----------------------------------------- Steve Rindsberg, PPT MVP PPT FAQ: www.pptfaq.com PPTools: www.pptools.com ================================================ Live and in personable in the Help Center at PowerPoint Live Sept 21-24, San Diego CA, USA www.pptlive.com |
Thread Tools | |
Display Modes | |
|
|