Generate personal word document based on form record

Hi,

I have 3 word documents (sampleA.docx, sampleB.docx, sampleC.docx) with its own content.

Example: sampleA.docx
"Hi {name},
Kindly note that your particular has been created:
DOB - {dob}
"
I created a grid that is linked to a form. My form has the following fields:

  1. name
  2. dob
  3. form_type

When user select “form_type = A”, it will retrieve the sampleA.docx and include the value for the “name” & “dob” into the word document “{name}” & {dob} respectively. The word document can then be downloaded.

​I have searching in the internet for few weeks but still could not find a solution for this.

Can anyone kindly advise how to I upload the word document to scriptcase and the coding to retrieve the respective document when a form is being filled? Thanks.

Hi,
my reply is a bit late… but i just started using scriptcase again.

I see what you want. In 2010 we had the same problem. We solved it by integrating wit Openoffice documents. (.ODF)
this format is in fact a zipped directory where content en format is separated. You unzip the file. look for content.xml. and search and replace what you want to have replaced. save the content file. zip the directory and rename it to [name].ODF.

https://en.wikipedia.org/wiki/OpenDocument_technical_specification

Hope this is helpfull