how to create a readable MS Word document for 97
Posted: Tue Feb 11, 2003 10:06 am
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>
<?
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>