none
Getting error ": Error HRESULT E_FAIL has been returned from a call to a COM component." at running Console application for generating PPT RRS feed

  • Question

  • Dear All,

    I am generating PPT slides with multiple charts on a single slide using C# and com library Microsoft.Office.Interop.PowerPoint.

    I have tested it on both office 2010 and office 2013. But sometimes get error :" Error HRESULT E_FAIL has been returned from a call to a COM component". This error occurance is dynamic i.e sometimes happen sometimes not. 

    Also above error mostly comes at below line of code at Microsoft.Office.Interop.PowerPoint.Chart.SetElement(MsoChartElementType Element).

    Sometimes exception excel and ppt both crashes while running.These are major issues.

    Please provide solution.

    Thanks,

    Naveen
    Tuesday, December 22, 2015 5:15 AM

All replies

  • Hello Naveen,

    Is the PowerPoint window/presentation visible when the SetElement is called?

    Tuesday, December 22, 2015 10:43 AM
  • >>>Also above error mostly comes at below line of code  at Microsoft.Office.Interop.PowerPoint.Chart.SetElement(MsoChartElementType Element).

    Sometimes exception excel and ppt both crashes while running.These are major issues.<<<

    According to your description, I have made a sample to try to reproduce this issue, unfortunately, as you mentioned this issue happen randomly, I can't.
    Could you reproduce this issue when you run the Console project on other machine?

    Otherwise could your provide more information about your issue, for example Visual Studio Version, sample code, screenshot etc., that will help us reproduce and resolve your issue.

    Thanks for you understanding

    Wednesday, December 23, 2015 5:59 AM