If you have a windows server with word installed on it you can use COM functions:
http://www.php.net/manual/en/ref.com.php
If you have a unix server it's more difficult. If you're getting data from a database I'm guessing each file would look the same. If that is so you can open a .doc file in notepad and copy and paste it to your code as a template putting variables in it. Then use header() to tell the browser it's a Word file and output it.
If you want to be able to customise content a bit more try using rtf which can be opened in Word.