Spire.Doc is a professional Word .NET library specifically designed for developers to create, read, write, convert and print Word document files. Get free and professional technical support for Spire.Doc for .NET, Java, Android, C++, Python.

Wed Feb 08, 2023 3:28 am

Hi,

I'm trying to create a Spire.Doc.Document object from a file but it's returning IndexOutOfRangeException.

Here's the stack trace:
at Spire.Doc.Collections.DocumentObjectCollection.ᜀ(DocumentObject A_0)
at Spire.Doc.Collections.DocumentObjectCollection.OnInsert(Int32 index, DocumentObject entity)
at Spire.Doc.Collections.DocumentObjectCollection.Add(IDocumentObject entity)
at sprⒾ.ᜀ(spr⓷ A_0)
at spr⓳.ᜓ(spr⓷ A_0, CharacterFormat A_1)
at spr⓳.᜔(spr⓷ A_0, CharacterFormat A_1)
at sprⒺ.ᜀ(spr⓷ A_0)
at sprⒾ.ᜀ(spr⓷ A_0)
at sprⓆ.ᜁ(spr⓷ A_0)
at spr⒲.ᜀ(Document A_0)
at spr⒱.ᜂ()
at spr⒱.ᜃ()
at spr⒲.ᜅ()
at sprⒻ.ᜀ()
at sprⒻ.ᜃ()
at sprⒻ.ᜀ(Stream A_0, Document A_1, spr⊯ A_2)
at sprⒻ.ᜀ(String A_0, Document A_1, spr⊯ A_2)
at Spire.Doc.Document.᜚(String A_0)
at Spire.Doc.Document.LoadFromFile(String fileName, FileFormat fileFormat, String password)
at Spire.Doc.Document.ᜀ(String A_0, String A_1)
at Spire.Doc.Document.LoadFromFile(String fileName)

Please help me look into this. I have attached the file for reference.

Thanks!

jgmondero
 
Posts: 2
Joined: Tue Feb 07, 2023 2:42 am

Wed Feb 08, 2023 3:58 am

Hi,

Thanks for your feedback.
I did a test with your document and reproduced your issue, I have logged this issue into our bug tracking system with the ticket number SPIREDOC-9033, our developers will investigate and fix it, sorry for the inconvenience caused. Once the issue is fixed, I will inform you asap.

Sincerely,
Triste
E-iceblue support team
User avatar

Triste.Dai
 
Posts: 1000
Joined: Tue Nov 15, 2022 3:59 am

Mon Apr 10, 2023 9:30 am

Hi,

Glad to inform you that we just released Spire.Doc 11.4.0 hotfix, which has fixed your issue SPIREDOC-9033, please download the latest version from the following links and have a test.
Website link: https://www.e-iceblue.com/Download/download-word-for-net-now.html.
Nuget link: https://www.nuget.org/packages/Spire.Doc/11.4.0

Best regards,
Triste
E-iceblue support team
User avatar

Triste.Dai
 
Posts: 1000
Joined: Tue Nov 15, 2022 3:59 am

Return to Spire.Doc