COM adn PHP4
| From: | stéphane BOUCHONNET | Date: | Fri, 04 Jan 2002 13:54:04 +0000 |
| Subject: | COM adn PHP4 | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-11295@lists.php.net to get a copy of this message | ||
Hello,
I'm a frenchman, and i try to use COM functions in
WORD with no sucess.
here is a part of my code where i try to simply put a
bold font at true in
order to make a beautiful document, but i can't.
Perhaps do you know a good site or document on this
,or
giving me teh good syntax.
best regards.
My configuration : windows 98
PHP4.0.6.
Apache 1.3.22
Mysql
script :
$word = new COM("word.application") or die
("Impossibilité d'instancier Word");
# Rendre visible la fenêtre Word
$word->Visible = 1;
# Ouvrir un nouveau document
$word->Documents->Add();
$word->Selection->TypeText("Document en cours de
développement....");
$word->Selection->TypeParagraph();
$word->Selection->TypeParagraph();
$ret=com_propset($word,Selection.Font.bold,True);
$word->Selection->Font->bold("$ret");
$word->Selection->TypeText("$coll[1] $coll[0]");
$word->Selection->TypeParagraph();
$word->Selection->TypeParagraph();
$word->Selection->TypeText("né le : $naissance");
$word->Selection->TypeParagraph();
$word->Selection->TypeText("Fonction :
$fonc[0]");
$word->Selection->TypeParagraph();
$word->Selection->TypeText("Nationalité :
$nat[0]");
$word->Selection->TypeParagraph();
$word->Selection->TypeText("CLIENTS");
$word->Selection->TypeParagraph();
$word->Selection->TypeText("$coll[12]");
# Sauvegarder le document
$word->Documents[1]->SaveAs("CV $coll[1]
$coll[0]");
//Libération des ressources
$word = null;
unset($word);
=====
@+Stéphane
___________________________________________________________
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
Yahoo! Courrier : http://courrier.yahoo.fr