Better still,

Take a look at RTF as a file format. Its readable in Word, looks like a Word
doc and can be saved with a '.doc' extension and you can store placeholders
that php can use to 'mail-merge' with.

Works for me.

Cheers

George

> -----Original Message-----
> From: Peter Lovatt [mailto:[EMAIL PROTECTED]
> Sent: 23 July 2003 9:04 am
> To: Chris Mach; [EMAIL PROTECTED]
> Subject: RE: [PHP-DB] write to word..
>
>
> Hi
>
> I did it like this
> <?php
> //create file here
>
>
> //then output it
>
>              header ("Content-type: application/msword");
>              header ("Content-Disposition: attachment;
> filename=letter.doc");
>              include('letter.htm');
>
> print('done it')
> ?>
>
> I wrote the letter to file and then included it, but you can probably just
> print HTML as you would normally. Word will open HTML files and
> maintain the
> format.
>
> HTH
>
> Peter
>
>
>
>
>
> -----Original Message-----
> From: Chris Mach [mailto:[EMAIL PROTECTED]
> Sent: 23 July 2003 03:01
> To: [EMAIL PROTECTED]
> Subject: [PHP-DB] write to word..
>
>
> hi,
>
> I'm just wondering if it is possible to write to a word document or any
> other file type that would allow for easy editing(besides txt) with out
> having to copy and past everything in? I'm looking to have a template
> perhaps in word and have the code insert variables from the database.
>
> If it is possible, could some one point me in the right direction. Like
> where to look in the manual.
>
> Thanks,
> Chris
>
>
>
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to