title: Read and Write .docx file with python
body: <p>I have a folder containing several <strong>.docx</strong> files with names <code>[Code2001.docx, Code2002.docx... Code2154.docx]</code>.</p>
  
  <p>I'm trying to write a script that will: </p>
  
  <ol>
  <li>Open each .docx file</li>
  <li>Append one line to the document; "This is checked"</li>
  <li>Save the .docx-file to another folder, named "Code2001_checked"</li>
  </ol>
  
  <p>After searching I've only managed to get the filename with the loop:</p>
  
  <pre><code>import os
  os.chdir(r"E:......\test")
  
  for files in os.listdir("."):
      if files.endswith(".docx"):
          print filename
  </code></pre>
  
  <p>I also found this: <a href="https://github.com/mikemaccana/python-docx" rel="nofollow">docx module</a> but the documentation is poor to continue.</p>
  
  <p>Any suggestions on how to finish this script?</p>