can any one help me to creating word doc using php script.
Requirement
i have created Text editor. but what ever content we i can create in text editor it should save in word document.
i am sending php script to you.. this is static but i want to save dynamic contents.
please send code or Advice me on this is highly appreciated.<?php
// starting word
$word = new COM("word.application") or die("Unable to instantiate Word");
echo "Loaded Word, version {$word->Version}\n";
//bring it to front
$word->Visible = 1;
//open an empty document
$word->Documents->Add();
//do some weird stuff
$word->Selection->TypeText("This is a test...");
$word->Documents[1]->SaveAs("text1.doc");
//closing word
$word->Quit();
//free the object
$word = null;
?>
Regards,
Sam