We have a document management system called Worksite. This DMS lets you save Word documents as ComObject. When I try to cast it to Aspose.Words.Document I get the following error message.
Unable to cast COM object of type ‘System.__ComObject’ to class type ‘Aspose.Words.Document’. Instances of types that represent COM components cannot be cast to types that do not represent COM components; however they can be cast to interfaces as long as the underlying COM component supports QueryInterface calls for the IID of the interface.
Any help would be appreciated.
Please accept my apologies for late response.
Thanks for your inquiry. Aspose.Words objects are .NET objects, but when used via COM Interop, they appear as COM objects in your programming language. Please make sure that your DMS object is of type Aspose.Words.Document and read following documentation link for your kind reference.
Could you please share which programming languages you are using along with sample code snippet?
I am using C# (Visual studio2010 and .net framework 4.0). It seems that a wrapper assembly is necessary to achieve this!? Perhaps you already have some sample code to help me get started? Maybe a good idea if make a sample wrapper in managed code and place it on your website for reference!?
Thanks for your inquiry. Unfortunately, Aspose.Words does not support the requested feature at the moment. However, we had already logged this feature request as WORDSNET-4977 in our issue tracking system. You will be notified via this forum thread once this feature is available.
We apologize for your inconvenience.