note 20862 modified in ref.com by danbrown

From: Date: Mon, 21 Dec 2009 17:17:19 +0000
Subject: note 20862 modified in ref.com by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-164237@lists.php.net to get a copy of this message
an easy way to convert your file from .doc to .html <?php // starting word $word = new COM("word.application") or die("Unable to instanciate Word"); // if you want see thw World interface the value must be '1' else '0' $word->Visible = 1; //doc file location $word->Documents->Open("E:\\first.doc"); //html file location '8' mean HTML format $word->Documents[1]->SaveAs("E:\\test_doc.html",8); //closing word $word->Quit(); //free the object from the memory $word->Release(); $word = null; ?> --was-- an easy way to convert your file from .doc to .html // starting word $word = new COM("word.application") or die("Unable to instanciate Word"); // if you want see thw World interface the value must be '1' else '0' $word->Visible = 1; //doc file location $word->Documents->Open("E:\\first.doc"); //html file location '8' mean HTML format $word->Documents[1]->SaveAs("E:\\test_doc.html",8); //closing word $word->Quit(); //free the object from the memory $word->Release(); $word = null; http://php.net/manual/en/ref.com.php

« previous php.notes (#164237) next »