Some of the sample code for generating PDFs from Office Templates uses the method
documentCompletePromise() to pause execution until the document contents have been fully loaded.
Typically the code looks like:
This function was removed in v10.0, which causes a documentCompletePromise is not a function message to be shown.
The solution is to use the replacement function with getDocumentCompletePromise();