Insert Symbol

Feb 7, 2012 at 4:25 PM

Hi, anyone know how to insert a symbol alongside text? I need to make a checkbox list. This is the tag that ends up in the xml file when you do it from within Word: <w:sym w:font="Wingdings" w:char="F06F"/>.

I thought of a textrun, but the place I need it is in a multi-line cell in a table. I am using multi-line cells because of the minimum row height problem. Using 'spaceAfter'=>0 in the cell paragraph style lets me do multiple lines without all the extra space.

Feb 16, 2012 at 1:53 PM

The template worked as a good solution for this. I just put a placeholder for the box in the Word document template which I was building with PHPWord. Then the program that is using the template to load all the variable data just replaces it.

Excerpt from template builder program:

$table6->addCell(5300, $styleCell)->addText('${box}   Purchase Order # ______________________________

${box}   Check # _____________________________________

${box}   Circle One: Visa/MC/AE     Exp. _________________

       Card # ______________________________________','RegText', 'ltStyle');

 

One statement in my make_word.php program replaces all 3 boxes:

$template->setValue('box','<w:sym w:font="Wingdings" w:char="F06F"/>');