Here is an imperfect suggestion, but this is the best I could imagine according to the information provided (in my ignorance of a concrete example).
-
Somewhere near the beginning of your document (main text), create a paragraph with what you’d like to appear in your header or footer with the required field insertion(s). Add fixed text if you feel like it (the fixed text may also be typed in the header/footer at your convenience).
-
Select the range of characters containing the field(s) and create a bookmark for it: Insert
>Bookmark
and give it name “name_and_case” (without quotes) or any other name meaningful for you.
-
Create a paragraph style for this ancillary paragraph in which Hidden is checked in `Font Effects* tab. Style the paragraph.
The paragraph being hidden will not print.
I recommend that in Tools
>Options
, LibreOffice Writer
>Formatting Aids
Hidden text is checked so that the paragraph still displays on screen and you can easily edit it. This may need to enable View
>Formatting Marks
.
-
In the header, Insert
>Cross-reference
, type Bookmarks, reference to Reference, selection “name_and_case” and any other required fixed text.
You do that only once in your template. Then the letter will automatically work as any other mail merge document.
To show the community your question has been answered, click the ✓ next to the correct answer, and “upvote” by clicking on the ^ arrow of any helpful answers. These are the mechanisms for communicating the quality of the Q&A on this site. Thanks!