Forum


Replies: 4   Views: 860
How to apply replacevariablebytext in document title
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 vikas1324  · 14-09-2020 - 11:00

Hi, i am applying replacevariablebytext in document title in word template but when i generate the report its not showing. please help me out.

Posted by admin  · 14-09-2020 - 11:17

Hello,

That replacement works correctly. What version and license of phpdocx are using?

Regards.

Posted by vikas1324  · 14-09-2020 - 11:43

we purchased advanced version but i am testing on trial version. In our template cover page have title text box .we assign variable inside the title textbox.  

Posted by admin  · 14-09-2020 - 11:48

Hello,

Textboxes don't use the same structure for text contents than 'normal' contents such as paragraphs, tables and others. To replace texts in textboxes you need to use the raw option available in replaceVariableByText or rawSearchAndReplace.

For futher support, please send to contact[at]phpdocx.com the username or e-mail of the user that purchased the license and a DOCX sample, and we'll generate a simple code to illustrate how to replace that content.

Regards.

Posted by vikas1324  · 14-09-2020 - 11:55

Deleted by vikas1324 · 14-09-2020 - 12:03