I can use header function to create a word document and format with HTML tags like the following codes. However, the page is not readable when opended with Word97. Does Anybody know how to make this work on Word97? What's the alternatives in formatting Word documents with PHP codes? Thanks in advance!
<?
Header("Content-type: application/msword");
Header("Conent-Disposition: attachment;filename=boom.doc");
?>
<center><b>Welcome to MS Word on the fly</b></center>
<table width=100% bgcolor="#F3F5EF">
<tr bgcolor="#F3F5EF">
<td align=center><b>Anrede</b></td>
<td align=center><b>Name</b></td>
<td align=center><b>Firma</b></td>
<td align=center><b>Strasse</b></td>
</tr>
</table>
how to create a readable MS Word document for 97
Moderator: General Moderators
word-html is some nasty stuff..
I created a report system for a client of mine with PHP generating RTF (Rich Text Format), which is fairly close to Word Native... You can create some simple documents and store as RTF and then look at the source, but I also recommend reading the RTF specs from Microsoft, as a simple word document includes a lot of crap you really don't need, like specifiying a bunch of fonts and styles and all that.. It takes a while to get into but may be worth it if you are in great need to Word documents..
I created a report system for a client of mine with PHP generating RTF (Rich Text Format), which is fairly close to Word Native... You can create some simple documents and store as RTF and then look at the source, but I also recommend reading the RTF specs from Microsoft, as a simple word document includes a lot of crap you really don't need, like specifiying a bunch of fonts and styles and all that.. It takes a while to get into but may be worth it if you are in great need to Word documents..