We are developing a VSTO Document-level customisation for MS word. We need to access the document from a background thread so that we do not stop the UI refreshing.
This works fine for properties such as Sections / Table etc on DocumentBase.
When trying to access CustomDocumentProperties or BuiltInDocumentProperties the following exception is received
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)).
Is it possible to access these properties from a background thread?
Thanks