PHP Classes

Document name

Recommend this page to a friend!

      MsDoc Generator  >  All threads  >  Document name  >  (Un) Subscribe thread alerts  
Subject:Document name
Summary:Can I change the name of the word document created
Messages:5
Author:Richard Hurley
Date:2005-12-15 10:58:29
Update:2010-01-08 13:04:42
 

  1. Document name   Reply   Report abuse  
Picture of Richard Hurley Richard Hurley - 2005-12-15 10:58:29
On one system I am using the document is downloaded rather than opened directly in Word. When this happens the document is given the name of the php page. eg sample.php

This also happens when the document is opened in Word on other systems in that this becomes the name of the document.

Can this be changed.

Thanks for the help. Excellent Class

  2. Re: Document name   Reply   Report abuse  
Picture of Max S. Ferreira Max S. Ferreira - 2005-12-16 22:37:09 - In reply to message 1 from Richard Hurley
thank you, for you to use my simple class

try this:
<?php
require_once('clsMsDocGenerator.php');
$doc = new clsMsDocGenerator();
....
header('Content-Disposition: attachment; filename="docName.doc"');
$doc->output();
?>

in next release..., will be:
<?php
require_once('clsMsDocGenerator.php');
$doc = new clsMsDocGenerator();
....
$doc->output("docName.doc");
?>

  3. Re: Document name   Reply   Report abuse  
Picture of Richard Hurley Richard Hurley - 2005-12-17 12:07:03 - In reply to message 2 from Max S. Ferreira
Thanks very much for the advice. I will try what you suggest.

When will your next release be available.

Many Thanks

Richard

  4. Re: Document name   Reply   Report abuse  
Picture of Moussa Moussa - 2007-10-02 10:05:52 - In reply to message 2 from Max S. Ferreira
hello

i find out your MsDoc Generator great and thank you.
I have some problem to make my word file on several pages.
i tried to put $doc->newPage(); but my doc is on one page and i couldn't find the number of the page.

My second request is how to make a header and footer text on the outpout page?

Thanks

  5. Re: Document name   Reply   Report abuse  
Picture of Pino Pollo Pino Pollo - 2010-01-08 13:04:43 - In reply to message 4 from Moussa
i tried to put $doc->newPage(); but my doc is on one page if i use microsoft word 2003. If i use microsoft word 2007 or open office, it work.