Categories > TinyButStrong general >

mergeField

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: lena
Date: 2016-09-22
Time: 12:49

mergeField

Hi,

I  have this example and this  does not work.

$TBS = $this->container->get('opentbs');
//$TBS->setOption('noerr', true);
$TBS->MergeField('account',array('id'=>55,'name'=>'Bob'));
$TBS->LoadTemplate("template1.docx");
$TBS->Show(OPENTBS_DOWNLOAD, "template.docx");


in temlate.docx  : 
some text in a word file with a [account.id] variable  [account.name]

By: lena
Date: 2016-09-22
Time: 16:35

Re: mergeField

I understood)) Firstly need to load the template and then to merge fields))
By: Skrol29
Date: 2016-09-27
Time: 09:40

Re: mergeField

ok