I have a text-based (as opposed to table-based) .docx document with a section that has several places in the paragraph for replacement. This paragraph must be duplicated and the tokens replaced for each entry in the array. I'm continuing to comb through the documentation but am kind of stuck on this one -- most of the examples are table-based and I'm not seeing how I can accomplish what I'm shooting for.
Here's an example of the section in the .docx file I am using as a template so far:
[onshow; block=begin; personsblock=tbs:p;]
Person 1
[flex_27.xx.01] [flex_27.xx.02], currently of [flex_27.xx.05], as amazing with the following: __{this has yet to be determined}__.
[onshow; block=end; personsblock=tbs:p]
... and my data so far is:
$personarray = array();
$personarray[] = array('tID27.01.01'=> 'Steve', 'tID27.01.02'=>'Klutcher' , 'tID27.01.05'=>'', 'tID27.01.06'=>'Cook');
$personarray[] = array('tID27.02.01'=> 'Tommy', 'tID27.02.02'=>'Boonary' , 'tID27.02.05'=>'Clarksville', 'tID27.02.06'=>'Montgomery');
... At this point, I am pretty much lost. I'll be programatically replacing the center 'code' (marked by xx) with the count of the person involved. What is the difference between a merge and a replace? How I combine the action? Can I do a multi-pass on the document somehow?
Sorry if these seem such basic questions but as I said, I've been stuck on this for two days.