This example makes a backup copy of the document on a file server when the document is closed. (The procedure is stored in a document, not a template.)
Private Sub Document_Close()
ThisDocument.Save
ThisDocument.SaveAs "\\network\backup\" & ThisDocument.Name
End Sub