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.
hi
I load several external file to create a new document with a table of content. For the 1 document i create a docx from template and the variable are replace like i wish too but in the other document they were not replace.
Is there a way to find and replace in a create document with external file?
Hello,
You can use the method replaceVariableByExternalFile. Please check the available documentation:
http://www.phpdocx.com/api-documentation/templates/replace-variable-external-file-Word-document
Regards.
i dont want to replace a placeholder by a whole document. i want to replace a word in a external file i load after a load the templace. i just want to do "find and replace" ty
Hello,
What do you mean by 'a word in a external file i load after a load the templace. i just want to do "find and replace" ty '?
Sorry but we don't understand the sentence.
What license of phpdocx are you using?
Please check the 'Templates' section on the API documentation:
http://www.phpdocx.com/documentation/api-documentation
Regards.
Ok 1 i load a template with placeholder in it. (this part work find)
2- i add a table of contents
3- i load a externalfill in the new document. (in this document we have the same placeholder )
so we have a new document with a template, a table of content and a external file.
4- i use replaceVariableByText
the replace text work in the template part but doesnt work in the part comming from the external file.
I wish to make a bif word file with the content of several other document depending of what the user want
i hope im more clear english is not my 1 language.
Hello,
You need to replace the placeholder in the document before adding it.
Regards.
oh ok. now it working perfect ty