saving word files

From: Date: Tue, 19 Apr 2005 19:11:39 +0000
Subject: saving word files
Groups: php.windows 
Request: Send a blank email to php-windows+get-25880@lists.php.net to get a copy of this message
i need to print the word file, but first testing by saving this seems not to work, site keeps loading :s:s:s nothing happens <?php $word = new COM("word.application") or die("Unable to instantiate Word"); $file = "c:/reminder.doc"; $word->Documents->Open($file); $new_file = "c:/reminder_new.doc"; $word->Documents[1]->SaveAs($new_file); $word->Quit(); $word->Release(); $word = null; ?> this neither, also much loading time, nothing happens // starting word $word = new COM("word.application") or die("Unable to instanciate Word"); print "Loaded Word, version {$word->Version}\n"; // bring it to front $word->Visible = true; // Open a word document, or anything else that word can read $input ="c:\\beginverslag.doc"; $word->Documents->Open($input); $new_file = "c:\\test.doc"; $word->Documents[1]->SaveAs($new_file); // closing word $word->Documents[1]->Close(false); $word->Quit(); // free the object $word->Release(); $word = null; unset($word); any suggestions?????

« previous php.windows (#25880) next »