In this sample we have done the following things. 1. Load the template document. 2. Update the fields in the document in order to get field value. 2. Iterate each element in the word document 3. Find the fields alone in these elements 4. Add the fields along with the field values. 5. Close the document.
Note: Please find the input Word document in “wwwroot” folder of above sample location.
Please let us know if you have any other questions.