Vote count: 0 I'm using DSOFile to write custom attributes to a file by using the following code: DSOFile.OleDocumentProperties file = new DSOFile.OleDocumentProperties(); file.Open(@"C:More_info.docx",false,DSOFile.dsoFileOpenOptions.dsoOptionDefault); But it gives me the following error while ruing the code: An unhandled exception of type 'System.InvalidCastException' occurred in batchFile.exe Additional information: Unable to cast COM object of type 'DSOFile.OleDocumentPropertiesClass' to interface type 'DSOFile._OleDocumentProperties'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{58968145-CF01-4341-995F-2EE093F6ABA3}' failed due ...
ادامه مطلب