Error: System.__ComObject' to interface type 'Microsoft.Office.Core.DocumentProperties' RRS feed

  • Question

  • - $exception {"Unable to cast COM object of type 'System.__ComObject' to interface type 'Microsoft.Office.Core.DocumentProperties'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{2DF8D04D-5BFA-101B-BDE5-00AA0044DE52}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE))."} System.InvalidCastException

    Can any one help please. Im creating Test cases for custom created Save button which saves the active running word doc to server. But saving is working in actual code but while running Via Test cases its not working. Im opening a local saved word doc using code and trying to save it to server.

    I had been through this "How to use automation to get and to set office document properties wit Visual c# .NET" but no luck.

    • Moved by CoolDadTx Friday, December 15, 2017 2:45 PM Office related
    Friday, December 15, 2017 7:25 AM

All replies

  • Hi ShivaDhanush,

    from your description, I can see that which exception you are getting and which article you had followed.

    I suggest you to post your sample code.

    so that we can try to check what you are doing exactly in your code.

    we will try to make a test with your code and try to reproduce the issue.

    we will try to find solution for it if any available and try to provide it to you.

    with only error message , it is hard for us to find the issue.

    so please try to provide code , we will try to provide you further suggestions to solve the issue.

    Thanks for your understanding.



    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

    Monday, December 18, 2017 2:03 AM