Python Routine To Automate Document Creation