Trying to cope up with HRESULT E_FAIL error that I keep getting while trying to open a powerpoint file. There is more to code but the very basic operation for which I get the error is shown in the code block below. Reference DLLs being used are: Office 14.0.0 and Microsoft.Office.Interop.Powerpoint 14.0.0.
Application application = new Application { DisplayAlerts = PpAlertLevel.ppAlertsNone };
Presentation powerpoint = application.Presentations.Open(@"X:\XXX\xxx.pptx");
powerpoint.SaveAs(@"X:\XXX\saved.pdf", PpSaveAsFileType.ppSaveAsPDF, MsoTriState.msoTrue);
It's a very basic operation, but not sure why it's complaining about the COM Exception. Microsoft Office 2010 32-bit with Service Pack 1 is installed on the machine.