Problem with using PowerPoint 2003 ins ASP.NET

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Marc Eggenberger

    Problem with using PowerPoint 2003 ins ASP.NET

    Hi there.

    I have an webapp (asp.net) which should use powerpoint to create a
    presentation and then send that presentation to the user.

    I'm using VS2003 and Office2003 (project req.).

    The webapp runs find but when I try to open powerpoint in my asp.net
    code I get an error

    COM object with CLSID {91493441-5A91-11CF-8700-00AA0060263B} is either
    not valid or not registered.

    The Code is at end.
    The code runs fine with an Windowsapp.
    I have set the Copy Local in the References of the dll's to true so the
    Interop dll's are there.

    What am I doing wrong here?



    code:

    try
    {
    //Oeffne PowerPoint
    PowerPoint.Appl ication objApp;
    PowerPoint.Pres entations objPresSet;
    PowerPoint._Pre sentation objPres;
    PowerPoint.Slid es objSlides;
    PowerPoint._Sli de objSlide;
    PowerPoint.Text Range objTextRng;
    Graph.Chart objChartPP;

    //Wegen Bug Q320369

    System.Threadin g.Thread.Curren tThread.Current Culture =
    System.Globaliz ation.CultureIn fo.CreateSpecif icCulture("en-US");

    objApp = new PowerPoint.Appl ication();
    objApp.Visible =
    Microsoft.Offic e.Core.MsoTriSt ate.msoTrue;
    objPresSet = objApp.Presenta tions;
    objPres = objPresSet.Open (".\\Vorlage n
    \\pp1.ppt", Microsoft.Offic e.Core.MsoTriSt ate.msoFalse,
    Microsoft.Offic e.Core.MsoTriSt ate.msoTrue,
    Microsoft.Offic e.Core.MsoTriSt ate.msoTrue);
    objSlides = objPres.Slides;

    }
    catch(Exception fehler)
    {
    System.Diagnost ics.Debug.Write Line("Fehler:
    " + fehler.Message) ;
    }
    --
    mfg
    Marc Eggenberger
Working...