RE: [PHP-WIN] COM adn PHP4
| From: | alain samoun | Date: | Fri, 04 Jan 2002 22:29:40 +0000 |
| Subject: | RE: [PHP-WIN] COM adn PHP4 | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-11307@lists.php.net to get a copy of this message | ||
Replace:
$ret=com_propset($word,Selection.Font.bold,True);
$word->Selection->Font->bold("$ret");
With:
$word->Selection->Font->bold=true; #Set font to bold for rest of
document
Or, to set all document to font/bold:
$word->Documents->Add();
$myRange = $word->ActiveDocument->Content;
$myRange->Font->bold=true;
A+
Alain
-----Original Message-----
From: stéphane BOUCHONNET [mailto:sbouchonnet@yahoo.fr]
Sent: Friday, January 04, 2002 5:54 AM
To: php-windows@lists.php.net
Subject: [PHP-WIN] COM adn PHP4
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
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-windows-unsubscribe@lists.php.net
For additional commands, e-mail: php-windows-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net