Document templates Letter template in Writer
TDF LibreOffice Document Liberation Project Community Blogs Weblate Nextcloud Redmine Ask LibreOffice Donate
Foreword
The video "Dokumentvorlagen in Writer - LibreOffice" shows how a Letter can be created as "Document template in Writer - LibreOffice" and links to this page here, which contains further information.
Link to the Video
Link to the Video (in German [DE]):
Dokumentvorlagen in Writer - LibreOffice
What are Document templates good for?
All Documents in LibreOffice are based on Document templates.
In the simplest case, this is in Writer a blank white sheet.
However, it can also be a Letter template, a form to be filled out or a Report template.
A Document template is a model or pattern that is used to create new Documents.
For example, you may want to write letters frequently.
It would be very labor-intensive if you had to write the sender each time, and determine the place for the address.
Then with every letter questions arise, such as:
- Which edge had I set where?
- Which font and font size did I use?
- And so on.
What is the advantage of a Document template?
The great advantage of the Document templates is that the recurring settings and specifications only have to be made once.
You should take enough time to do this and do everything according to your ideas.
Create a Document "Letter" for a Template
So you first create a letter for a template in which everything recurring is specified.
- Address field
- Sender field
- Margins
- possibly a graphic
- Format Styles / Paragraph Styles for text markups
- Format Styles / Page Styles for different Page margins
Save the "Letter" as Document template
When the letter is finished, it can now be saved as a Document template.
Choose
▸ ▸ from the menu.The "Save as Template" dialog displays the "Document template categories" (the Templates Folders).
Select the folder where the new Document template should be saved.
For example, use the folder "My Templates".
At the top of the dialog enter the name "Letter Max Mustermann" for the new Document template.
You can now decide whether the letter should be saved as the Default template.
If you set a check mark at "Set as default template", this Letter template will always be opened when you open Writer.
Then click on
.Writer will save the new Document template (as an OTT file) and the dialog will close.
You can now close "Letter".
A Document template becomes a new document
Document templates are stored in template folders.
To use a Document template to create a Document, proceed as follows:
Open Writer.
Choose
▸ ▸ from the menu.In the "Manage templates" dialog that opens, "Text Documents" is already preselected as the filter, since we are in Writer.
Some Templates are displayed here, depending on the Template.
Select the "My Templates" folder here.
The Document templates contained in the folder will be displayed.
Click on the Document template "Letter Max Mustermann" and click
.The "Template" dialog closes.
The previously selected Document template now automatically became a new Document.
You can now edit the new Document (i.e. write a letter) and then save it with a meaningful name, just as you are used to any other Document.
Reusing the Document template
The Document template "Letter Max Mustermann" remains unchanged and can therefore be used again and again.
Set a default Document template
You can make any Document the default Document template.
If necessary, you can also switch back to the old standard template.
If you have selected or created the Document you want to make the default Document template, choose via the menu
▸ ▸ .In the "Save As Template" dialog select the Template folder and enter a meaningful name.
Click on "Set as default template" below.
Now click
.The next time you open Writer or choose
▸ ▸ , a document will be created based on the Document template just set as default.Manage Document templates
Create a Template folder
Choose
▸ ▸ ( ▸ ▸ ) from the menu.The "Templates" dialog opens.
In the dialog you can click the
button and then select "New Category".A "New Category" dialog opens in which you can specify the Category name.
Here you enter a folder name, e.g. "Letter templates".
Click on
.The "Category" (folder) is saved.
Click
.Delete a Template folder
Choose
▸ ▸ ( Ctrl + ⇧ Shift + N ).The "Template" dialog opens.
In the dialog you can click the
and then select (Folder).A dialog opens in which ask you, "Do you want to delete the selected category?".
Click on
or .Clicking
will delete the choosed folder.Click
.Move a Document Template
Choose
▸ ▸ from the menu.The "Templates" dialog will open.
In the "Templates" dialog, select the Category that contains the Document Template to be moved.
The Document Templates available there will be displayed.
Right-click the Document Template you want to move.
Click
from the context menu.In the "Select Category" dialog that opens, you can select any Categories to move to.
Alternatively, you can
by entering a name in this field.The moved Document Template is now in the Category you selected or created.
Import a Document template
Choose
▸ ▸ from the menu ( Ctrl + ⇧ Shift + N ).The "Templates" dialog opens.
Select a category to import to.
Click the
button.Choose
.The "Open" dialog will open.
Select the desired Document template from your directory.
Click on the
button.Click the
button.User paths
The user path for Document templates can be found in the
▸ ▸ ▸ menu.The path is displayed in the "Options - LibreOffice - Paths" dialog in the "Type"-"Templates" column.
By default, the user path is in the directory:
C:\Users\USERNAME\AppData\Roaming\LibreOffice\4\user\template
( Windows ).
You can change the user path by clicking the
button.In the dialog "Edit paths: Templates" dialog, click on the
button.In the "Select Folder" dialog that opens, select the desired directory (user path) and click the
button.In the "Edit Paths: Templates" dialog, click on the "Path List" (it must be highlighted at the front selection point) and double click
.You can now manage the Document templates in the new user path.
Working with fields - Example
It is common to use the mail merge function for serial letters.
However, if only a few or individual documents are to be sent, some people find it difficult to do this with the form letter function.
Alternatively, for individual documents, the function of "Fields" and "Conditional Text" can be useful.
See also: Writer Guide - Chapter 17 - Fields
Fields
Fields can be defined to be used anywhere in the document.
Choose
▸ from the menu and select the "Custom Properties" tab.Click on the
button.Enter "Name", "Type" and "Value".
For example, if you want to set up the first name and last name for the address field of the letter, enter "First Name Last Name" as the name (or the desired name "Max Mustermann" for better orientation).
For "Type" select "Text".
For Value, enter the desired "First Name Last Name", e.g. "Max Mustermann".
This allows you to specify fields for the entire address field.
Fields that may vary, such as the salutation (Mr./Mrs.) are discussed below under "Conditional text".
To enter the fields in the document, press Ctrl + F2, the tab "Document info" type "User defined".
Mark the desired field and click on the
button.The desired text is now inserted in the document.
Insert Field
Press Ctrl + F2.
In the dialog, select the "DocInformation" tab and for "Type" select Custom/Max Mustermann.
Click
.Conditional text
The basis of this description is the Conditional Text in the Online help.
You can set up field commands in your document that display a specific text when a previously defined condition is met.
For example, you can set up conditional text for a salutation in the letter.
In this example, setting up conditional text consists of two steps.
First, you create a variable and then define the condition.
To define a condition variable
First, define a variable for the condition statement.
Choose
▸ ▸ - "Variables" tab from the menu.In the "Type" selection, click on the "Set variable" entry.
In the "Name" input field, enter the name for the variable, for example "Salutation".
In the Format list on the right, click the "Text" entry.
Type 1 in the Value field below and then click
.To define a Condition and the Conditional Text
The second part of the example is to define the condition that must be met, and to insert a placeholder for displaying the conditional text in your document.
Place the cursor where you want to insert the conditional text in your text.
Choose
▸ ▸ , and then click the "Functions" tab.Click "Conditional Text" in the "Type" list.
Type Salutation EQ "3"
in the Condition box.
In other words, the conditional text will be displayed when the variable in the field that you defined in the first part of this example is equal to 3.
The quotation marks enclosing the "3" indicate that the variable that you defined in the first part of this example is a text string.
Type the text that you want to display when the condition is met in the Then box.
There is almost no limit to the length of the text that you can enter.
You can paste a paragraph into this box.
Click
and then click .To display the Conditional Text
In this example, the conditional text is displayed when the value of the conditional variable is equal to 3.
Place your cursor in front of the field that you defined in the first part of this example, and then choose
▸ .Replace the number in the Value box with 3, and then click
.If the field does not update automatically, press F9.
Further Informations
Letter Max Mustermann
According Video
Letter Max Mustermann - Border visible using tables (in German).
Letter Max Mustermann - Border not visible using tables (in German).
According to DIN 5008
Recommended for use
Sample letter according to DIN 5008; second side different (in German [DE]).
DIN 5008 in Wikipedia
Definition Shape A ( Source: Von Flamon - Eigenes Werk, CC0 )
Definition Shape B ( Source: Von Flamon - Eigenes Werk, CC0 )
Related topics
Professional text composition with Writer
Inheritance in paragraph styles in Writer
Dokumentenvorlagen_einsetzen (in German)
Business letter according to DIN 5008
Document template Letter in Writer 52
Documentation / Manuals
Here you will find the Documentation / Manuals:
Any questions?
For questions on this topic go to:
Get Involved
Join us today and help us to make it even better!
Donate
LibreOffice is Free Software and is made available free of charge.
Your donation, which is purely optional, supports our worldwide community.
If you like the software, please consider a Donation.