'Non-negative number required' exception when saving as text

My code is pretty simple…

objStream = File.OpenRead(ImportPath + NewFile.Name)
ReDim arrFile(objStream.Length)
objStream.Read(arrFile, 0, FileLen)

Dim AWord As New Aspose.Word.Word
Dim inDoc As Aspose.Word.Document
Dim licenseFile As String = Application.StartupPath + “\Aspose.Word.lic”
Try
AWord.SetLicense(licenseFile)
inDoc = AWord.Open(objStream)
inDoc.Save(ImportPath + “Filename.txt”, SaveFormat.FormatText)
Catch ex As Exception
fError.WriteLine(NewFile.Name + ": " + ex.message)
GoTo SkipIt
End Try

I’m getting an exception on the AWord.Open(objStream) line that says,

Non-negative number required.
Parameter name: count

Anything I can do about this? Should I send you the file?

Hi,

Yes, just email the file to word@aspose.com. Thanks.

Hi Michael,

I have fixed this one. Technically speaking the stylesheet in this document had a style with no formatting instructions and that was not really expected.

Please download Aspose.Word 1.1.7 hotfix, more details here #4642.