Editing premade word document using word api

Im currently working on a web application that needs to add text in a premade word document in curtain places on the page

“The two submarines of the ______, ______and [ U-2 ] were built for the [Austro-Hungarian Navy].”

The text needs to be inserted into predetermined places.

What way do you recommend this can be done.
Is it possible with JS?