How to modify custom.xml within docx using python
<p>I've been using python-docx to programmatically change parts of a word document (*.docx) that needs to be updated monthly. My problem now lies with editing custom properties in the template, specifically the 'Date Completed' property.</p>

<p><a href="http://i.stack.imgur.com/dAzdA.png" rel="nofollow">Custom template properties</a></p>

<p>My current simplified python code is as follows:</p>

<pre><code>import python-docx
doc = docx.Document('MonthlyUpdate.docx')
help(doc.core_properties)  #only shows author, category, etc, but no 'Date Completed'
</code></pre>

<p>The relevant file appears to be in *.docx\docProps\<strong>custom.xml</strong>, but I'm unsure of how to edit that file within python 2.7. Is it possible through python-docx or would I need to dive into lxml/etree modules?</p>

<p>This functionality hasn't been implemented yet. There's a feature request open for it and one user has done some work on it you can find linked to from there.</p>

<p><a href="https://github.com/python-openxml/python-docx/issues/91" rel="nofollow">https://github.com/python-openxml/python-docx/issues/91</a></p>

<p>I think this would require using his fork, so you might not get all the latest features, depending on the version the fork is based on.</p>

python xml lxml elementtree python-docx