473,467 Members | 2,023 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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

4 New Member
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, 127 views)
Dec 27 '10 #1
3 5493
ohmygod
4 New Member
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, 424 views)
Dec 27 '10 #2
ohmygod
4 New Member
It seems that no one likes to answer questions in this forum?
Dec 29 '10 #3
aliveless
1 New Member
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: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.