Create a new document from a template