Creating Documents

I am a novice in programming. I would like to know if it is possible to send data from scriptcase to a MSword template and how I go about doing that.

The best way is to use docx or rtf as basis for a template. In general the docs need to be generated on the server. So you need to generate a docx or rtf file and send it to the users browser for download. I generally create an application to upload the template to the database. Then this template is used to generate the doc. I insert the text by replacing variables for textblocks. Look into the php documentation for replacing text for other text.

Hello @aducom
Would you please help me in how I pass variables to a documents that already stored in the DB.

The best way is to use parameter substitution. I generally use parameters in the form [%myparm%]. It’s very straight forward. You save your templates with these vars, create an array with the values. I have a library function that parses the array of parameters and substitutes it in the template to generate a full file.

Thanks Albert.