Unable to import PowerPoint presentation

Home Forums Bug Report Unable to import PowerPoint presentation

Viewing 4 posts - 46 through 49 (of 49 total)
  • Author
    Posts
  • #9284
    Tghannou
    Member

    Hy Alin,

    Can you show us the code of “checkppt” app, please.

    This code dont work, i’ve done won’t work

    Microsoft.Office.Interop.PowerPoint.ApplicationClass powerPointApplication = new Microsoft.Office.Interop.PowerPoint.ApplicationClass();
    Microsoft.Office.Interop.PowerPoint.Presentation presentation = null;
    try
    {
    SourceDocPath = SourceDocPath.ToLowerInvariant();

    presentation = powerPointApplication.Presentations.Open(SourceDocPath,
    Microsoft.Office.Core.MsoTriState.msoTrue,
    Microsoft.Office.Core.MsoTriState.msoTrue,
    Microsoft.Office.Core.MsoTriState.msoTrue);

    }
    catch (Exception ex)
    {
    textBox1.Text = ex.Message + Environment.NewLine + ex.StackTrace;
    }
    finally
    {
    // Quit PowerPoint and release the ApplicationClass object.
    if (presentation != null)
    {
    presentation.Close();
    presentation = null;
    }
    if (powerPointApplication != null)
    {
    powerPointApplication.Quit();
    powerPointApplication = null;
    }
    GC.Collect();
    GC.WaitForPendingFinalizers();
    }

    Thanks

    #9285
    jinu
    Member

    I have the “PowerPoint could not open the file” issue when website run under IIS Application pool Identity NOT an Administrator User.
    Everything okay under an Administrator User.
    Unfortunately, Administrator User not feasible at the Production environment.
    Is Administrator privileges mandatory for PowerPoint automation this way?
    Please advise.

    #9286
    sudesh1456
    Member

    Hi Alain,
    I’m getting this error.

    output:
    Check CURRENT_USER…
    Found nothing
    Check LOCAL_MACHINE…
    Found something: C:\PROGRA~2\MICROS~1\Office14\POWERPNT.EXE
    Check if file exists
    Found.
    Check version
    major: 14
    minor: 0
    Connect to PPT DLL
    Connected to PPT DLL
    Connect Error
    System.InvalidCastException: Unable to cast COM object of type ‘Microsoft.Office.Interop.PowerPoint.ApplicationClass’ to interface type ‘Microsoft.Office.Interop.PowerPoint._Application’. This operation failed because the QueryInterface call on the COM component for the interface with IID ‘{91493442-5A91-11CF-8700-00AA0060263B}’ failed due to the following error: Library not registered. (Exception from HRESULT: 0x8002801D (TYPE_E_LIBNOTREGISTERED)).
    at Microsoft.Office.Interop.PowerPoint.ApplicationClass.get_Presentations()
    at check_ppt.Form1..ctor()
    Unable to cast COM object of type ‘Microsoft.Office.Interop.PowerPoint.ApplicationClass’ to interface type ‘Microsoft.Office.Interop.PowerPoint._Application’. This operation failed because the QueryInterface call on the COM component for the interface with IID ‘{91493442-5A91-11CF-8700-00AA0060263B}’ failed due to the following error: Library not registered. (Exception from HRESULT: 0x8002801D (TYPE_E_LIBNOTREGISTERED)).
    at Microsoft.Office.Interop.PowerPoint.ApplicationClass.get_Presentations()
    at check_ppt.Form1..ctor()

    Please help.

    #9287
    alain
    Keymaster
Viewing 4 posts - 46 through 49 (of 49 total)
  • The forum ‘Bug Report’ is closed to new topics and replies.