Var wordNameList=wordNames. Split ('; '). ToList ();
String filePaths=string. The Empty;
for (int i=0; I & lt; WordNameList. Count; I++)
{
If (I==0)
{
FilePaths=ConfigurationManager. AppSettings [" CODPath "] + @ \ "" + wordNameList [I] +." doc ";
Document. LoadFromFile (filePaths, Spire. Doc. FileFormat. Doc);
}
The else
{
FilePaths=ConfigurationManager. AppSettings [" CODPath "] + @ \ "" + wordNameList [I] +." doc ";
Document. InsertTextFromFile (filePaths, Spire. Doc. FileFormat. Doc);
//document. SaveToFile (" merger documents. Docx, FileFormat docx);
}
}
When inserting an error
CodePudding user response:
