Static??
Why are you trying to do this on-the-fly (dynamicaly).
Why not just create a word document, with the headers and footers required. Simply OUTPUT THROUGH - THAT document, using it in the template method. If you can NOT use a generic file, could you use a number of generic files to be your template to output to?