Word.doc

Is there a way to build a Word.doc file using PHP? That is to say, are there any reasonably straight forward tools or documentation at least for accomplishing the task? Even a ‘word decoded’ manual that explains all of its various control codes and how to use them would be great.

Any ideas on this?

How indepth are you looking to get with this. I mean like are you going to be bolding text and changing font sizes and types or is it your basic text with returns?

Have you looked at Microsofts documentation? Maybe here:
http://search.microsoft.com/search/resu … &s=1&swc=4

As deep as it gets!

I’ve looked there and other sites within MS but couldn’t find the docs I’m looking for. I need to build a file that my client can print. (They actually want something on paper.) I thought that since they are acclimated to Word I would just give them a Word document, allowing them to tweek it if they wanted to.

It can be done using COM objects but I have never played with it.

You can generate OpenOffice.org documents using OOoPHP (which works quite fine, but make sure the memory limit is high enough)

The website is in french but you should be able to find the download link. The documentation is also in french but the code examples are good enough and the API is quite intuitive if you are used to OOP.
http://www.apicnet.net/article.php3?id_article=73

Sponsor our Newsletter | Privacy Policy | Terms of Service