Word has all that (see VBA).

Don't have Word? See LibreOffice. I remember it has scripts like this too.


If you want to try it, see the BOILERPLATE feature of Yankee Clipper at
http://www.intelexual.com/products/YC3/

Bob