Update table of contents after docx report has been generated
When docx report is generated, update the table of contents as the last step before saving the report output. Reason: if the report contains imported html documents, the page numbers in the ToC are often wrong after the 1st html document. With lots of documents, the page numbers get increasingly out of sync. The user has to use F9 in the output file to correct this.