Home > Net >  Spire. Doc inserted into the document InsertTextFromFile method error has been added with the same k
Spire. Doc inserted into the document InsertTextFromFile method error has been added with the same k

Time:10-07

Spire. Doc. Document Document=new Spire. Doc. The Document ();
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:

  • Related