I have a very general (somewhat vague) question. What I would wish to make is a document (in Writer) with “keywords”. This is the template. Another application replaces the keywords by real data, and saves the file under a new name. That application also launches Writer (with the newly created document).
That “application” gets its data from a database, plus some fields that the user types in. The application also stores information back into the database and does some other processing. I can build that application myself.
The reason is: this is the only task left for which we use Microsoft Word at our office. It is part of our main administration/bookkeeping system; invoice creation, invoice tracking, etc. It is old and has its limitations. I would like to redesign it, based on LibreOffice.
One option that I can think of: generate RTF (which is fairly easy). However, I prefer ODF.