Your response to look at the documentation is a little dismissive:) I see nothing among the examples that does what I'm trying to do -- create a custom style and then apply it to text. As I said, every example seems to do only direct inline styling of text. I want to add a style, and then apply it. I see how to add a style with this.
[code]
$aNewStyle = new CreateStyle();
$myParameters = array('type' => 'paragraph',
'styleId' => 'myStyle',
'name' => 'myStyle',
'customStyle'=> 'true',
'basedOn' => 'Normal',
'next' => 'Normal',
'keepNext' => 1, 'keepLines' => 1, 'spacing_before' => '200',
'spacing_after' => '0',
'b' => 1);
$aNewStyle->addStyle(array($myParameters));
$docx->setXmlWordStyles($aNewStyle);
[/code]
However, I don't see how I can apply the style to text using any of the public methods. Admittedly, I'm no genius programmer, so an example on this might help some people, including myself!