none
Error in getting Word document's custom properties RRS feed

  • Question

  • I'm working on a Word VSTO plugin in C#.

    When I run my application on a separate thread(using multi-threading) and try to get document's custom properties with the below code:

     DocumentProperties properties = (DocumentProperties)document.CustomDocumentProperties;

    It gives the following error:

      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)).

    Any help to resolve this issue.

    Tuesday, June 16, 2015 8:08 AM

Answers