: is there a way to create a word document using php?
This strongly depends on the operating system, your php build runs on. If you are running php on a windows server, you can use the COM-Object to generate every file, a filter exists for. You can read information about that on php.net.
A way to "generate a word file" on a unix/linux based server, is to generate a xml-file and import this file to word.