Forum


Replies: 2   Views: 1223
Use replacevariablebytext with multiple targets
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 rstoeber  · 06-06-2021 - 19:13

I have been using replaceVariableByText on the document body with no problem. For the first time today I have a Word document with a "variable" in the footer, and it wasn't replaced. Reading the documenation (always a good idea) I see that I have to specify the footer, or header, specifically as a target for the replacement.

The question is, can I combine multiple targets in a single statement, or do I have to have to execute replaceVariableByText 3 separate times to replace in the header, body and footer?