473,385 Members | 1,890 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Error HRESULT E_FAIL has been returned from a call to a COM component

Hi,

I am using Powerpoint 2007 api to convert ppt files to html files by C# written code. Currently I am meeting with a problem, which is converting from ppt to html is fine but following error reports when converting from html back to ppt.
Error HRESULT E_FAIL has been returned from a call to a COM component.

I debugged in the code and found the error occurrs when invoking the open() method of PowerPoint_Class.Application's Presentations which works fine when opening ppt file to convert from ppt to html.

I've also done some manual tesing based on the html files converted from the PPT file. When I tried to open it with PowerPoint 2007, it reports an error "Problems During Load" saying missing data in one html file under the XXXX_files folder but I looked for the html file and it exists there!

Please allow me to attach this special ppt file (the code works fine with other PPT files whatever converting from ppt to html or from html to ppt).

Anyone who can give me some suggestions on this would be much appreciated.

Thanks
Attached Files
File Type: zip test.zip (110.2 KB, 126 views)
Dec 27 '10 #1
3 5486
Attached is the screenshot when I try to open the test.html with PowerPoint 2007. I do not know if this is the root cause. Please advise.

BTW, when I click "OK", the ppt is continuing opening with all content displayed fine.
Attached Images
File Type: jpg problem.jpg (19.5 KB, 423 views)
Dec 27 '10 #2
It seems that no one likes to answer questions in this forum?
Dec 29 '10 #3
end of 2012 now; still no answer
having the exact same issue as OP...
Word works, Excel works, PowerPoint does not...

VS2010 and Office 2010 with 12.0(2007) PIA

Have been searching all over the place and this was one of the very few posts concerning this exact problem.

No answer, anywhere...

Expand|Select|Wrap|Line Numbers
  1. using PowerPoint = Microsoft.Office.Interop.PowerPoint;
  2.  
  3. PowerPoint.Application PowerPointApp = new PowerPoint.Application();
  4.  
  5. PowerPoint.Presentation presentation = null;
  6. object paramMissing = Type.Missing;
  7.  
  8. try
  9.             {
  10.                 presentation = PowerPointApp.Presentations.Open(filepath, Microsoft.Office.Core.MsoTriState.msoTrue, Microsoft.Office.Core.MsoTriState.msoTrue, Microsoft.Office.Core.MsoTriState.msoFalse);
  11.  
  12.                 if (presentation != null)
  13.                     presentation.SaveAs(targetFilepath, PowerPoint.PpSaveAsFileType.ppSaveAsXPS, Microsoft.Office.Core.MsoTriState.msoTrue);
  14.                     //presentation.ExportAsFixedFormat(targetFilepath, PowerPoint.PpFixedFormatType.ppFixedFormatTypeXPS, PowerPoint.PpFixedFormatIntent.ppFixedFormatIntentPrint);
  15.             }
  16. catch (Exception ex)
  17.             {
  18.                 //COM exception here: HRESULT = E_FAIL
  19.             }
  20.  
Nov 21 '12 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Sergey | last post by:
Hi, Randomly I get an error "Function returned |" while trying to upload a file in ASP application, use FileUp server- side component from SoftWare Artisans ... can't find any references to...
9
by: Dario | last post by:
This is a technical C++ post regarding the Microsoft runtime error R6025 Pure Virtual Function Call that sometime occurs in programs compiled with Microsoft Visual C++ 6.0. Please consider the...
2
by: obeOnline | last post by:
I'm getting the following error... System.Net.HttpWebRequest.CheckFinalStatus() +676 System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult) +139...
5
by: Martin Jørgensen | last post by:
Hello again, Sorry to bother but I guess my C++ book isn't very good since it obviously contains errors so the program code doesn't work with g++. However I don't understand what the problem...
4
by: stephen | last post by:
Hi, I am getting an error while trying to create an excel file. "Description: The application attempted to perform an operation not allowed by the security policy. To grant this application the...
8
by: Alvin | last post by:
I'm making a very simple game in SDL, and I'm not asking for SDL help I hope - this looks like something C++ related, so I'll ask here. I have a class for a simple block, or tile, in the game,...
2
by: andy | last post by:
Hello, I'm having trouble with this section of code: // Advance the row. iRowPos += iTextHeight; iRowCount ++; hr = m_pSet->MoveNext(); // See if this is the last row. if (hr ==...
1
by: =?Utf-8?B?UGFsbHZp?= | last post by:
Hello friends, I am facing this problem("MEMBER NOT FOUND" error HRESULT : 0x80020003 (DISP_E_MEMBERNOTFOUND) ) in Visual Basic 2005 (i.e. VB .NET) for the fourth statement(ObjWb =...
1
by: suniladhyaru | last post by:
Hi All, Could you help me solving this problem ?? error PRJ0019: A tool returned an error code from "Performing Post-Build Event..." Regards, Sunil Adhyaru
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.