Tghannou

Forum Replies Created

Viewing 1 post (of 1 total)
  • Author
    Posts
  • in reply to: Unable to import PowerPoint presentation #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

Viewing 1 post (of 1 total)