A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Powerpoint, Publisher and Visio » Powerpoint
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Presentation cannot open



 
 
Thread Tools Display Modes
  #1  
Old June 24th, 2008, 06:50 AM posted to microsoft.public.powerpoint
[email protected]
external usenet poster
 
Posts: 22
Default 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  
Old June 27th, 2008, 10:43 AM posted to microsoft.public.powerpoint
[email protected]
external usenet poster
 
Posts: 22
Default 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  
Old June 27th, 2008, 04:14 PM posted to microsoft.public.powerpoint
Steve Rindsberg
external usenet poster
 
Posts: 9,366
Default 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  
Old June 30th, 2008, 11:02 AM posted to microsoft.public.powerpoint
[email protected]
external usenet poster
 
Posts: 22
Default 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  
Old June 30th, 2008, 04:06 PM posted to microsoft.public.powerpoint
Steve Rindsberg
external usenet poster
 
Posts: 9,366
Default 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  
Old July 1st, 2008, 08:30 AM posted to microsoft.public.powerpoint
[email protected]
external usenet poster
 
Posts: 22
Default 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  
Old July 18th, 2008, 01:25 AM posted to microsoft.public.powerpoint
Steve Rindsberg
external usenet poster
 
Posts: 9,366
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 08:29 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.