Error : PowerPoint could not open the file. RRS feed

  • Question

  • using Powerpoint = Microsoft.Office.Interop.PowerPoint;
    using Microsoft.Office.Core;
     Powerpoint.Application App = new Powerpoint.Application();
     Powerpoint.Presentation Pr = App.Presentations.Open(Server.MapPath("~/Amit.pptx"));
     Powerpoint.Presentation Pr2 = App.Presentations.Add(Microsoft.Office.Core.MsoTriState.msoTrue);
     List<Powerpoint.Presentation> Prlist = new List<Powerpoint.Presentation>();
     Pr2.SaveAs(AppDomain.CurrentDomain.BaseDirectory.ToString() +  DateTime.Now.ToString().Replace("/", "").Replace(":", "").Replace(" ", ""));
     catch (Exception ex)

    Above Code is to collect slide from 1st ppt file & put into new PPT file...


    WE GIVE ACCESS PERMISSION to POWERPOINT SLIDE.DLL FROM Control Panel\All Control Panel Items\Administrative Tools\Component Services

    Powerpoint.Presentation Pr = App.Presentations.Open(Server.MapPath("~/Amit.pptx"));
    Following Error we get form above code:

    Error :

    PowerPoint could not open the file.

    Error post on Azure Development forum Link:


    Above code is use on Azure Web Role so plz help me on basis of Windows Azure

    Plz help me......

    Thnks & Regard's

    Thursday, September 29, 2011 9:24 AM


  • Hello,

    I'd start the PowerPoint UI and try to open the file, the path and name of which is returned by Server.MapPath("~/Amit.pptx").

    Regards from Belarus (GMT + 2),

    Andrei Smolin
    Add-in Express Team Leader
    Thursday, September 29, 2011 9:58 AM

All replies