none
VSTO with Windows 10 and Office 365 RRS feed

  • Question

  • We have an implementation using VSTO to launch Excel components within a Windows application. After we upgraded our development environment to Windows 10 with Office 365, the excel component fails to load with the below errors. [Update]: We have a C# code that uses windows api methods to set the Excel application as a child to the Winforms window that is trying to open Excel.

    [Update]: The C# component uses SetParent method from win32 API("user32.dll") passing along the handle of the Windoes form and the Excel Application created using interop assemblies. We are seeing below exceptions raised at this point.

    Office 365 Unhandled exception at 0x002D514C in EXCEL.EXE: 0xC000041D: An unhandled exception was encountered during a user callback

    Exception thrown at 0x002D514C in EXCEL.EXE: 0xC0000005: Access violation reading location 0x00000008.

    Has anyone faced this or see why this could be happening?

    • Edited by devprav Friday, April 27, 2018 5:19 PM
    Thursday, April 26, 2018 3:57 PM

All replies

  • Hello Praveen,

    What line of code exactly causes Excel to crash?


    profile for Eugene Astafiev at Stack Overflow, Q&A for professional and enthusiast programmers

    Thursday, April 26, 2018 4:30 PM
  • Hi Praveen,

    >> the excel component fails to load with the below errors

    What is the Excel components and how did you launch it from VSTO?

    To check whether there is something wrong in the VSTO or Excel components, I suggest you launch the components from Console App.

    It would be helpful if you could share us which it throws exception and related code.

    Best Regards,

    Tao Zhou


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, April 27, 2018 2:05 AM
  • Hi - I have updated the question with more info. Please let know if any further info will be helpful. Thanks for the help!!!
    Friday, April 27, 2018 5:20 PM
  • Could you share us a simple project which could reproduce your issue?

    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, May 1, 2018 6:11 AM