Forum


Replies: 4   Views: 1661
Second document from template replacevariablebytext fails
Topic closed:
Please note this is an old forum thread. Information in this post may be out-to-date and/or erroneous.
Every phpdocx version includes new features and improvements. Previously unsupported features may have been added to newer releases, or past issues may have been corrected.
We encourage you to download the current phpdocx version and check the Documentation available.

Posted by TimSmith  · 02-03-2020 - 14:24

I am trying to create two documents from similar templates (the template use the same variable names).

The call replaceVariableByText fails in multiple places on the second document. 

I have tried unset and = null before creating the second document. Neither change the behaviour.

There is nothing wrong with either template because whichever is creted first works fine it is always the replace in the second document that fails. 

I can't find and reset or clear function and the only reference in the forums is to using unset (which doesn't work)

Any help apprceiated.