I am trying to merge multiple documents to one document, using the below code. But the second time when i was trying to open the document - oTarget = oWord.Open(sFinalDocFileName);, I am getting the error message as "file already in use by another user".
How can I release the file after every save ?
// copy process
Document oSource = new Document(sFilename);
Document oTarget = null;
oTarget = oWord.Open(sFinalDocFileName);
oTarget = new Document();
foreach(Section oSection in oSource.Sections)
Section oNewSection = (oTarget.ImportNode(oSection, true) as Section);