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.

Sat Jul 13, 2019 6:34 am

When I try to save as a ".docx" file, I get a KeyNotFoundException.

This may have to do with the way I'm trying to separate a file by section--maybe my code is wrong, but I've tried it 2 ways now: first, I created a new Document and added a section with Clone from the original. Then I loaded the original Document and Removed all sections except the one I want. The second way worked better for several reasons, but in both cases, I could only save to a ".doc" file. When I try a ".docx" file, I get a KeyNotFoundException.

I've uploaded my source code, but the original Word file is too big. I have posted it Google Drive at the link is included in a text file in the uploaded attachment.

owurman
 
Posts: 20
Joined: Tue Apr 04, 2017 8:43 pm

Sat Jul 13, 2019 7:03 am

As a follow-up: if I save a .doc, immediately read that .doc back into a new Document, then save as .docx, then it works.

owurman
 
Posts: 20
Joined: Tue Apr 04, 2017 8:43 pm

Mon Jul 15, 2019 5:29 am

Hello,

Thank you for contacting.
Sorry I can’t get your original Word file, since it require me to log in with your google email and password. Could you please provide it for us in a way that we can get without logging in? Thanks in advance. Meanwhile, I simulated a Word file and tested your scenario with our latest Spire.Doc Pack(hot fix) Version:7.6.16, but I didn't reproduce your issue. If you were using an old version, I suggest you also try again with the latest version. Look forward to your further feedback.

Sincerely,
Lisa
E-iceblue support team
User avatar

Lisa.Li
 
Posts: 1261
Joined: Wed Apr 25, 2018 3:20 am

Wed Jul 17, 2019 10:00 am

Hello,

Greetings from E-iceblue.
Did our latest version work for you? Thanks in advance for your feedback and time.

Sincerely,
Lisa
E-iceblue support team
User avatar

Lisa.Li
 
Posts: 1261
Joined: Wed Apr 25, 2018 3:20 am

Wed Jul 17, 2019 11:12 pm

Hi, sorry about that... I was very confused who was asking for access. Let me try it again!

owurman
 
Posts: 20
Joined: Tue Apr 04, 2017 8:43 pm

Thu Jul 18, 2019 4:04 am

Hello,

I got your original Word file ("2018.docx") this time. I did reproduce your exception when testing the file. This issue has been logged into our bug tracking system for further investigating and fixing. If there is any update, we will let you know immediately. Sorry for the inconvenience caused.

Sincerely,
Lisa
E-iceblue support team
User avatar

Lisa.Li
 
Posts: 1261
Joined: Wed Apr 25, 2018 3:20 am

Return to Spire.Doc