This project is read-only.
1
Vote

[Solved] FontStyle on SetValue Element

description

Hi !
I'm searching how to make things like this :
$phpWord = new \PhpOffice\PhpWord\PhpWord();
$document = $phpWord->loadTemplate("template.docx");
/* NewStyle */
$document->addFontStyle("BoldRed", array('color' => 'red', 'bold' => true));
/* SetValue */ 
$document->setFontStyle("BoldRed")->setValue("ITEM_TO_CHANGE", "Test");
This method doesn't work, any idea ?

comments

Krishn4k wrote Jan 12, 2015 at 2:17 PM

I found,The style is the same as that of the document ... Thanks !