Word Object Model...?

Word Object Model...?

am 08.10.2007 16:53:00 von Gustav Wiberg

--1502606-12923-1191855213-3720
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable

Hi!
=20
Where should I get any reference for Word Object Model for use with PHP. Is=
Microsofts documentation the only one available or is does anyone know som=
e word-reference-parameters that are available for PHP-use... ?
The one I found is:=20
http://msdn2.microsoft.com/en-us/library/tcyt0y1f(VS.80).asp x
=20
=20
Is there specific in Word that has to been installed for COM+ to work?
=20
Best regards
/Gustav Wiberg
=20
=20
$word =3D new COM("word.application");
//To see the version of Microsoft Word, just use $word->Version
echo "I'm using MS Word {$word->Version}";
//It's better to keep Word invisible
$word->Visible =3D true;
//Creating new document
$word->Documents->Add();
//Setting 2 inches margin on the both sides
$word->Selection->PageSetup->LeftMargin =3D '2"';
$word->Selection->PageSetup->RightMargin =3D '2"';
//Setup the font
$word->Selection->Font->Name =3D 'Verdana';
$word->Selection->Font->Size =3D 8;
//Write some text
//$word->Selection->TypeText("Hello, universe!");
$word->Selection->Documents[1]->Open("c:\\www\\test.doc");
//Save the document as DOC file
//$word->Documents[0]->SaveAs("test.doc");
//$word->Documents[1]->SaveAs("C:htdocshello2.rtf",6);=20
// or use: $word->Documents[1]->SaveAs("C:htdocshello2.htm",8); to save as =
HTML file
//And of course, quit Word
//$word->quit();
//$word->Release();
$word =3D null;
//Give the user a download link
echo '';
?>
--1502606-12923-1191855213-3720--