Automatic text replacement from database

Hello
I am new to linking databases with text-editors.

My idea is to create a letter form with (mostly) invariable text and appearance.
The letter form is a standard letter, but has many pages and the variable parts spread out over almost all pages.

The variable parts are adressee (name + address), date + some other parts/text blocks within the text-flow.

These variable parts I intend to collect in a separate data-file (some sort of table with an invariable file-name), and when opening the letter form, it connects with the data-file, copies all content into the defined locations within the letter form.
Notably, the formatting (bold, underlined, …) should not change. Formatting is defined in the letter form (I assume, or else in the data-file).

Can this be done?
And if yes: is there somewhere a guideline?

Kind regards, Thomas

What you are describing is mail merge. Start there and ask further if you need more specific guidance.

Actually the replacement happens, when you ask to print, not when opening the file, and you are asked to select rows from your datasource.
.
PS: I never used the wizard. On can drag fields from datasources and ther is insert field in the menus…

Open your letter.
Get the data source window [Ctrl+SHift+F4].
In the left pane, browse to your database query or table and select it.
From the right pane drag the gray column headers into the letter.
This inserts placeholders for the respective database columns.

Test the setup by printing (Ctrl+P).
Confirm that you are going to print a form letter.
Choose “File” output instead of physical printer.

Thank you all, guys

My first, very fundamental, tests work well.
Let me ask: is there a way to organize the records within the database in columns (instead default rows)? That would make my life a hole lot easier and improves readability in my database.

Or else, if column-oriented records are not possible: can I link one letter-form with two or more database files? That would allow a compromise in terms of readability.

Best regards, Thomas

A database needs to be machine readable. It stores data in a certain structure with a fixed amount of columns and a growing amount of rows (billions if necessary).
Human readability can be achieved when you pull selected data into some reporting tool, a spreadsheet or input forms.

If you mean storage, then for example:

Actually, it is quite easy:
I write all data human-readable in a column, open a 2nd sheet in the same document and fill the first row with references to the column in the first sheet.
In Writer, I use then only the sheet with the row-represented data.

It works.
Thanks for all.

Use it, if that’s what you need.
.
But it seems not to be what you asked naming “database” and tagging “base”.