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.

Mon Jan 12, 2015 2:59 am

Hi,

My project is about merging 1,600 documents into one document. For testing, I tried to merge 500 documents and it worked well. But when I tried to merge 1,600 documents, the application stopped and throws an error:

An exception of type 'System.Runtime.InteropServices.ExternalException' occurred in Spire.Doc.dll but was not handled in user code

Additional information: Cannot open storage. File Name is: D:\Docs-Dev\LettersTemp\960.doc


I tried to merge again, same error occurred at the 812th document.

Any solutions for merging bulk documents?

Please help. Thanks.

hazelD.pc
 
Posts: 6
Joined: Thu Aug 14, 2014 6:39 am

Mon Jan 12, 2015 6:19 am

Hello,

Please attach the 960.doc document here for our testing, if it is inconvenient to attch here, you could send it to us(Support@e-iceblue.com) via Email.

Thanks,
Gary
E-iceblue support team
User avatar

Gary.zhang
 
Posts: 1380
Joined: Thu Apr 04, 2013 1:30 am

Wed Jan 14, 2015 6:07 am

Hi,

Thanks for the reply. The issue has been fixed by updating the Spire Doc installed in my project. But upon merging 1,600 documents, an error occurred.
An exception of type 'System.OutOfMemoryException' occurred in Spire.Doc.dll but was not handled in user code


Is there a suggestion on how to prevent this or to free memory when merging documents?

Thanks for the help.

hazelD.pc
 
Posts: 6
Joined: Thu Aug 14, 2014 6:39 am

Wed Jan 14, 2015 9:27 am

Hello,

Thanks for your response.
There might be no any ways to prevent the out of memory when merging a large amout of documents continuously, the reason is that the process executes in memory, if you merge continuously, the object is always used not be released, the memory will increase until overflow, so we suggest you merge documents in batches.
Sincerely,
Gary
E-iceblue support team
User avatar

Gary.zhang
 
Posts: 1380
Joined: Thu Apr 04, 2013 1:30 am

Thu Jan 15, 2015 1:43 am

I see.. Thank you very much..

hazelD.pc
 
Posts: 6
Joined: Thu Aug 14, 2014 6:39 am

Fri Jan 16, 2015 7:02 am

Hello,

Please feel free to contact us if you have any questions or needs.

Sincerely,
Gary
E-iceblue support team
User avatar

Gary.zhang
 
Posts: 1380
Joined: Thu Apr 04, 2013 1:30 am

Return to Spire.Doc