System.ArgumentOutOfRangeException when using Word.Open (string)

Hi,

I’m getting the following error when using Word.Open on particular files. We have about 4000 word documents to migrate (which will eventually just involve searching through any merge fields and replacing them…)

The following error occurs on some (about 700) of the files…

System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
at System.Collections.ArrayList.get_Item(Int32 index)
at Aspose.Word.File.t.a()
at Aspose.Word.File.t.c()
at Aspose.Word.File.t.c(al A_0)
at Aspose.Word.File.br.b(Int32 A_0)
at Aspose.Word.File.br.a(a5 A_0)
at Aspose.Word.File.br.c(Int32 A_0, Int32 A_1)
at Aspose.Word.File.br.b()
at Aspose.Word.File.ba.a(ao A_0)
at Aspose.Word.Document.a(ao A_0)
at Aspose.Word.Document…ctor(String fileName)
at Aspose.Word.Word.Open(String fileName)
at ParagraphMigration.ProcessParagraphs.ProcessDirectory(DirectoryInfo d) in d:\documents and settings\vzly1j\my documents\va\source\paragraphmigration\paragraphmigration\processparagraphs.cs:line 103

The files definitely exist, at first glance they all appear to have merge fields inside tables - although I’m currently doing a more detailed exploration (there are 700!!)

I’m running version 1.7.9, and as far as I know none of these documents have been altered and saved with any version of Aspose…

Any ideas?

Hi,

I’ve fixed this and released Aspose.Word 1.7.10.

One document was crashing because table was stored in the document in some unusual format, I presume non MS Word writer.

The other document has textboxes in group shapes (grouped with rectangles) and also a couple of some strange invisible textboxes.