Create a word document from user input

Dear bubblers,

I want to build an App where the user answers some questions by selecting an answer from a dropbox and also fills in some details manually in a text field. After answering the questions the user shall be able to download a final Word document.

Example: Document about Speed

  1. Question: Select if you want to display the speed in km/h or mp/h
  2. Question: Insert the speed:

If the User chooses km/h and inputs 100 I want to automatically create a word document with the following content:

" 1. The speed is 100 km/h."

In a best case scenario even the automatic numbering would be active.

How is something like this possible? I really don’t want to prepare 1.000 documents in the database but rather hope its possible to generate them automatically.

Thank you so much.