When saving a particular document (attached) in Aspose.Words, I get an index out of range error. I tried removing the contents of the document to see if it was something in the content, but it didn't fix the problem. Other documents do not have the problem.
"Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index"
HERE IS THE RELEVANT PORTION OF THE STACK TRACE:
at System.Collections.ArrayList.get_Item(Int32 index)
at xa604c4d210ae0581.x6fa6e31d93cf837a.xe84e6ff66aac2a0e(Int32 xc0c4c459c6ccbd00)
at xa604c4d210ae0581.x2b702525301ee74a.x261adce1963ad007(Int32 xc0c4c459c6ccbd00)
at xa604c4d210ae0581.x2b702525301ee74a.x1ff8ac05a72bd9dd(Int32 x18d1054d82981887, String xc15bd84e01929885)
at x9e260ffa1ac41ffa.xe397b5e25a350375.x6d5145c03507a8ad(String xc15bd84e01929885)
at x9e260ffa1ac41ffa.x163859bfa28558c4.VisitBookmarkEnd(BookmarkEnd node)
at Aspose.Words.BookmarkEnd.Accept(DocumentVisitor visitor)
at Aspose.Words.CompositeNode.x464d2134480a7bf2(DocumentVisitor x672ff13faf031f3d)
at Aspose.Words.Paragraph.Accept(DocumentVisitor visitor)
at x9e260ffa1ac41ffa.x163859bfa28558c4.x6075c9125351e131(CompositeNode x03e7e66b1eecc96f)
at x9e260ffa1ac41ffa.x163859bfa28558c4.x160a0bf4de8f6bd0()
at x9e260ffa1ac41ffa.x163859bfa28558c4.x8cac5adfe79bc025(x8556eed81191af11 x5ac1382edb7bf2c2)
at Aspose.Words.Document.xf381a641001e6830(Stream xcf18e5243f8d5fd3, String xafe2f3653ee64ebc, SaveFormat xd003f66121eb36a0)
at Aspose.Words.Document.Save(Stream stream, SaveFormat saveFormat)