Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from docx import *
- document = newdocument()
- # This location is where most document content lives
- docbody = document.xpath('/w:document/w:body',namespaces=wordnamespaces)[0]
- # Append two headings
- docbody.append(heading('Heading',1) )
- docbody.append(heading('Subheading',2))
- docbody.append(paragraph('Some text')
Add Comment
Please, Sign In to add comment