none
Open PowerPoint file (pptm) without Office installed on the server RRS feed

  • Question

  • Hi,

    Some guy in my organization have the code below to open one PowerPoint file:

    string strTemplate;
    strTemplate = MapPath("~/Relatorio.pptm");
    objApp = new PowerPoint.Application();
    objApp.Visible = Microsoft.Office.Core.MsoTriState.msoTrue;
    objPresSet = objApp.Presentations;
    objPres = objPresSet.Open(strTemplate,Microsoft.Office.Core.MsoTriState.msoFalse, Microsoft.Office.Core.MsoTriState.msoTrue, Microsoft.Office.Core.MsoTriState.msoTrue);
    objSlides = objPres.Slides;Microsoft.Office.Interop.PowerPoint.CustomLayout customLayout = objPres.SlideMaster.CustomLayouts[Microsoft.Office.Interop.PowerPoint.PpSlideLayout.ppLayoutText];
    strTemplate = @"c:\teste\Relatorio de Progresso - " + texto + "-" + DateTime.Now.Year.ToString() + "-" + DateTime.Now.Month.ToString() + "-" + DateTime.Now.Day.ToString() + ".pptm";
    objPres.SaveAs(strTemplate, Microsoft.Office.Interop.PowerPoint.PpSaveAsFileType.ppSaveAsDefault, Microsoft.Office.Core.MsoTriState.msoTrue);
    objPres.Close();
    objApp.Quit();


    When the report is generating it gives this error:
    The message filter indicated that the application is busy. (Exception from HRESULT: 0x8001010A (RPC_E_SERVERCALL_RETRYLATER))

    The PowerPoint program is open then it hangs in there.

    We have Office 2010 installed on that server but is not activated because we don't see a reason for that.

    Now we want to uninstall Office 2010 (due to license questions) and make possible to that guy generate these reports.

    I can't imagine a reason to have a client software installed into one server only to generate reports...

    Any help?


    Monday, July 15, 2013 12:28 PM

Answers

All replies