I've got the following code...
$item1 = new WordFragment($docx);
$item1->addText('Chapter 1', array('pStyle' => 'Heading1PHPDOCX'));
$item2 = new WordFragment($docx);
$item2->addText('Section', array('pStyle' => 'Heading2PHPDOCX'));
$item3 = new WordFragment($docx);
$item3->addText('Another TOC entry', array('pStyle' => 'Heading3PHPDOCX'));
$itemList= array(
$item1,
array(
$item2,
array($item3)
)
);
$docx->addList($itemList);
While this adds the correct text to the List, it ignores the pStyle. It just gets created in the default font and style. How do I get the List to preserve the pStyle? I need those items to be in Heading 1, Heading 2, etc.
Andrew