RE: [PHP-DB] write to word..
| From: | George Pitcher | Date: | Wed, 23 Jul 2003 08:26:24 +0000 |
| Subject: | RE: [PHP-DB] write to word.. | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-29425@lists.php.net to get a copy of this message | ||
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:pjln1@sunmaia.net]
> Sent: 23 July 2003 9:04 am
> To: Chris Mach; php-db@lists.php.net
> 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:cjmach@gto.net]
> Sent: 23 July 2003 03:01
> To: php-db@lists.php.net
> 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
>
>