title: Open a word document and save it to another folder with vbscript
body: <p>I have working code that opens up a word document programmatically using vbscript, makes a change, then saves that same document and closes that same document.  </p>
  
  <p>Is it possible to do the same thing, but save the document to another folder and close out both instances of word?  I slightly modified my original code, but it only closed out the second instance of the word document that was saved.  </p>
  
  <p>Apparently, word thinks if I'm saving to another folder it needs 2 instances of the document.  This is some of my original code:</p>
  
  <pre><code>Set objDoc = objWord.Documents.Open(objFile.Path)
  'modify the document.
  etc...
  
  objDoc.SaveAs objFSO.BuildPath(strDirectory, objFSO.GetFileName(objFile.Path))
  objDoc.Close
  </code></pre>
  
  <p>this works fine for one document. Then all I changed was this, adding another directory to write to instead of the original:</p>
  
  <pre><code>objDoc.SaveAs objFSO.BuildPath(strDirectory &amp; saveDir,  objFSO.GetFileName(objFile.Path))
  </code></pre>
  
  <p>and I ended up with two identical word documents opened and when I closed the one I was saving, the other stayed open.</p>
  
  <p>Is there a simple way to do this?</p>
  
  <p>Thanks,</p>
  
  <p>James</p>