How to generate/merge a document from an application

Hello everyone,

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.

Regards,
Thiadmer Riemersma

@ThiadmerRiemersma - Glad to hear that you figured out your own problem :slight_smile: Could you please mark your question as answered? That way it won’t show up when we go looking for unanswered questions. Thanks!

Hmmm… How do I mark my question as answered. I tried clicking on the “checkmark” symbol in the left margin of my answer, but it said that I need >50 points to accept an answer to my own question. I tried to “close” the question, but it said that I need a reputation of 250 to close questions.

@ThiadmerRiemersma - What? you need 50+ karma to close your OWN question? That seems totally illogical and is probably one of the big reasons why there are so many unanswered questions. I apologize for this site being so user-unfriendly. I will try to get to the bottom of this for you.

Hi again – I’ve tried to figure out how much karma I’d need to mark someone else’s Q as answered, but I’m not sure. I might need to be a mod to do that.

I would try to make all only in the database (LibO Base) and replace the Writer files by reports. This should be the easiest way.

I did something similar many years agon Access and only in Access.

OK. I admit, I could easily have answered my own question before asking it.

I had not realized that the ODF format is XML in a ZIP archive. Now that I know, generating a new ODF document from a template is as easy as doing it for RTF.

Regards,
Thiadmer Riemersma