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 22, 2018 10:59 pm

I'm trying to merge some fields in the attached document. Other documents work just fine, and have for years. But with this particular document I get the error "The argument cannot be null or empty string. Parameter name: value". The exception is thrown at the following line:

Document document = new Document(FileName.ToString());

Doesn't matter where the file is located on my file system, so it's some type of issue with the document itself. What's wrong with the document and how do I make it usable?

Stack Trace:

at Spire.Doc.Documents.SdtListItem..ctor(String displayText, String value)
at spr᳠.ᜀ(XmlReader A_0, SdtDropDownList A_1)
at spr᳠.ᜀ(XmlReader A_0, SDTProperties A_1)
at spr᳠.ᜁ(XmlReader A_0, StructureDocumentTagCell A_1, TableRow A_2)
at spr᳠.ᜂ(XmlReader A_0, TableRow A_1)
at spr᳠.ᜆ(XmlReader A_0, Table A_1)
at spr᳠.ᜎ(XmlReader A_0, IDocumentObject A_1)
at spr᳠.ᜍ(Stream A_0)
at spr᳠.ᜂ(sprᢌ A_0)
at spr᳠.ᜁ(Document A_0)
at spr᳠.ᜁ(Stream A_0, Document A_1)
at spr᳠.ᜀ(String A_0, Document A_1)
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..ctor(String fileName)
at FormTemplates.ReadWordFileBookMarks(String FileName) in E:\FormTemplates.cs:line 171
at Admin_FormDocuments.ButtonInsert_Click(Object sender, EventArgs e) in E:\Visual Studio 2015\Projects\Admin

trupsis
 
Posts: 3
Joined: Thu Oct 25, 2012 7:36 pm

Tue Jan 23, 2018 3:51 am

Hello,

Thanks for your feedback. Please update to the latest version(Spire.Doc Pack(hot fix) Version:6.1.12) which doesn't have the issue and try again.

Best regards,
Simon
E-iceblue support team
User avatar

Simon.yang
 
Posts: 620
Joined: Wed Jan 11, 2017 2:03 am

Tue Jan 23, 2018 7:56 pm

What is the actual issue with this document? We have hundreds of documents that are merging just fine but this one is a problem. I'm not sure we want to spend thousands of dollars to update to the latest version just because one particular document is having an issue.

trupsis
 
Posts: 3
Joined: Thu Oct 25, 2012 7:36 pm

Wed Jan 24, 2018 8:46 am

Hello,

Thanks for your reply. The issue is caused by the Content Control in your document and the version of Spire.Doc you are using can't parse it. But the new version does.

Best regards,
Simon
E-iceblue support team
User avatar

Simon.yang
 
Posts: 620
Joined: Wed Jan 11, 2017 2:03 am

Wed Jan 24, 2018 3:03 pm

Thank you. I've confirmed that if I remove the Content Controls then the document merges fine.

trupsis
 
Posts: 3
Joined: Thu Oct 25, 2012 7:36 pm

Thu Jan 25, 2018 1:46 am

Hello,

Thanks for you reply. If any other query, please don't hesitate to contact us.

Best regards,
Simon
E-iceblue support team
User avatar

Simon.yang
 
Posts: 620
Joined: Wed Jan 11, 2017 2:03 am

Return to Spire.Doc