Mon Jan 24, 2022 10:04 am
Hello Adrian,
Thanks for sharing more information!
I simulated a project as the information you provided, and then load 4 files, each file is larger than 4MB, but still cannot reproduce your issue. Here are some methods for your try. First, please use document.Dispose(); to release the memory our product use after you finishing save. Or you can also change the solution platforms to X64, since x64 allows more memory space.
Besides, according to your code, do you want to merge two files to one document? If so, you can also use document.InsertTextFromFile("filepath", FileFormat.Docx); or document.InsertTextFromStream(stream, FileFormat.Docx); to achieve your needs.
If the issue still exists after trying these methods, I am afraid that this issue may relate to your input files. Please provide them to us for further investigate, we promise to keep your documents confidential, and we will not use it for any other purpose. Also, you could remove the security data of your Word as long as the modified files could reproduce your issue. Thanks in advance.
Sincerely,
Marcia
E-iceblue support team