We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Please help me with the code to convert aspose doc object to Microsoft.Office.Interop.Word.Document

Please help me with the code to convert aspose doc object to Microsoft.Office.Interop.Word.Document.
I have a requirement like, converting a doc or dot to aspose doc or docx and again convert the same in to Microsoft.Office.Interop.Word.Document object to pass it in to a webservice as a parameter.
your help is appreciated.

Hi Nair,
Thanks for your request. There is no direct way to perform such conversion. To achieve this, you have to save the document on disk and then open it using Word Automation.
Best regards,

I have the content of word document in the form of ByteArray, is there any way i can put the same in the Aspose word document?

Thanks for your request. Sure you can. Please see the following code:

// Here you get byte array that represents your document.
// To demonstrate the techniques i read byte array from file.
byte[] docBytes = File.ReadAllBytes("in.doc");
// Create a stream from byte array.
MemoryStream docStream = new MemoryStream(docBytes);
// Create a document from stream.
Document doc = new Document(docStream);

Hope this helps.
Best regards,