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

Free Support Forum - aspose.com

Exception "The document appears to be corrupted and cannot be loaded" for seems-to-be valid document


When I am trying to load the attached document using the following code:
Dim AsposeDocument As New Aspose.Words.Document(fileName)

I get exception “The document appears to be corrupted and cannot be loaded.”
Hi Olexandr,

Thanks for your inquiry. After an initial test with Aspose.Words for .NET 15.9.0, I was unable to reproduce this issue on my side. I would suggest you please upgrade to the latest version of Aspose.Words. You can download it from the following link. I hope, this helps.

Best regards,

Unfortunately after updating Aspose references from version 14 to version 15.9.0 I cannot compile my project as Aspose.Words.Drawing.DrawingML class is not found anymore. And this class is very important for extracting images from Word documents.

Any idea how I can rewrite the following code:

Private Sub ProcessImages(ByRef xmlText As String, childNode As Aspose.Words.Drawing.DrawingML, ByRef imageIndex As Integer, imageData As Generic.List(Of Byte()))
If CType(childNode, Aspose.Words.Drawing.DrawingML).HasImage Then
imageData.Add(CType(childNode, Aspose.Words.Drawing.DrawingML).ImageData.ImageBytes)
xmlText &= String.Format("<img src=""#image{0}"" />", imageIndex)
imageIndex += 1

End If
End Sub

Hi Olexandr,

Thanks for your inquiry. DrawingML class was removed from latest versions of Aspose.Words. Please refer to the following page:

Public API Changes in Aspose.Words 15.2.0

Best regards,