I am trying to process a word doucment using below sample of code. While creating a Document object using memory stream, error is thrown that is highlighted at the end.
Now, if I open the word document, just edit its header with a space, save it and return back to process it using below piece of code, everything works fine.
Not possible to do it for 1000s of documents.
DLL Version Used : 11.7.0.0
Dim ms As MemoryStream = New MemoryStream(WordFileBinaryData)
Dim convertWords As Aspose.Words.Document = Nothing
Try
convertWords = New Aspose.Words.Document(ms)
Catch ex As Exception
End Try
Error Message:
The document appears to be corrupted and cannot be loaded.