I am developing a web part using share point 2013 and Visual Studio 2013.I have to display the preview of a power point file(also excel and word files).Preview is working fine for .pdf files.So my idea is to convert ppt file to pdf file and then display the preview.Please see my code.
Microsoft.Office.Interop.PowerPoint._Application PPApplication = new Application();
Presentation PPDoc = null;
PPDoc = PPApplication.Presentations.Open(InputFilePath);
PPDoc.SaveAs(OutputFilePath, PpSaveAsFileType.ppSaveAsPDF);
But the first line of code to create an object generated following error. Retrieving the COM class factory for component with CLSID {91493441-5A91-11CF-8700-00AA0060263B} failed due to the following error: 80070005 Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)) Then I followed steps in the link below. "Retrieving the COM class factory for component.... error: 80070005 Access is denied." (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)) Then the error changed which is given below. Retrieving the COM class factory for component with CLSID {91493441-5A91-11CF-8700-00AA0060263B} failed due to the following error: 80010001 Call was rejected by callee. (Exception from HRESULT: 0x80010001 (RPC_E_CALL_REJECTED)). How can I solve this issue.Please help me.Thanks in advance
I got a similar error from a webapp using a webservice on a local server. My webservice is writing to disk and this error occured because the application pool running my webservice did not have the proper read/write permissions.
User contributions licensed under CC BY-SA 3.0