A family of Microsoft relational database management systems designed for ease of use.
Well, obviously, a template is just a special case of a standard drawing. The code would monitor events from the document and when it sees the appropriate event (beforedocumentsave, beforedocumentsaveas) intercept it and add your own
http://msdn.microsoft.com/en-us/library/ms427234(v=office.12)
al