Click here to Skip to main content
15,887,345 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Getting a weird error like Error HRESULT E_FAIL has been returned from a call to a COM component at this point
Microsoft.Office.Interop.PowerPoint.Presentation ppt = MSPpt.Presentations.Open(src,MsoTriState.msoFalse,MsoTriState.msoFalse,MsoTriState.msoFalse);



This is my code.
public void ConvertPptToHTML(string src, string Tgt)
{
Microsoft.Office.Interop.PowerPoint.Application MSPpt;
MSPpt = new Microsoft.Office.Interop.PowerPoint.Application();

Microsoft.Office.Interop.PowerPoint.Presentation ppt = MSPpt.Presentations.Open(src,MsoTriState.msoFalse,MsoTriState.msoFalse,MsoTriState.msoFalse);
ppt.SaveAs(Tgt, PpSaveAsFileType.ppSaveAsHTML, MsoTriState.msoTrue);
}

Any help?
Posted
Comments
ravikiran from Hyderabad 10-Dec-13 4:40am    
Mention Which MicrosoftOffice you are using
Office13
MSOffice 2007
or
MSOffice2003 (generally not)
Member 10456348 10-Dec-13 7:20am    
MSOffice 2010
creepz03 10-Dec-13 19:49pm    
Do you have any other options other than Microsoft.Office.Interop? Well, as per my experience it has a lot of issues when deployed to server. And I've read a lot of article stating not to use it.
Member 10456348 11-Dec-13 0:28am    
can u suggest me other options for how to convert powerpoint to html?
creepz03 11-Dec-13 0:56am    
You could try this one http://www.aspose.com/docs/display/slidesnet/Converting+PPTX+to+HTML

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900