LibreOffice Writer: Creating Templates

As we said in the previous tutorial, the selection of templates for download leaves something to be desired. So the best thing you can do is create your own. When you have become an expert on all things LibreOffice you will discover that you can create very complex templates that do many things for you. For instance, when I was in graduate school we were given long and detailed instructions on how our dissertations were to be formatted, and your dissertation could be rejected for some trivial transgression against these rules. Creating a template with all of the right settings was the best way to ensure that you would have no problems. But for an introductory lesson let’s do something a little simpler. Let’s create a template for a letter.

Do do this, first open a new document by pressing Control+N. When I do this, of course, I will get a document that is pre-configured to start with a Heading 1, because that is how my default template is configured. But all I have to do is go to the Apply Style selector in the upper left, and change it to Text Body. Then, I need to consider how I want my letter to be laid out. I usually put the date first, and have it flushed to the right. So I will press the Flush Right button, and now my insertion mark is on the right margin of the page. Next, I know that if I use this template many times I will always want to current date to appear. That is also easy, since I can use a Field to do this. All I need to do is go to Insert–>Fields–>Date:

Inserting Date Field

This will always put in the current date whenever you create document based on this template so long as you have your computer properly configured for date and time. It is pulling the data from the system. When you do this, you will see today’s date, but you will see that it is inside a gray box. That is a visual indication that you have a field inserted, rather than just typed text.

Next, I hit Enter a couple of times, then the Flush Left button to put my Insertion mark on the left. I type “Dear “, that is the word Dear followed by a space. Then I insert another field to prompt me for the name of the person. I go to Insert–>Fields–>Other, and it brings up the dialog for Fields. Select the Functions tab, then under Type select “Placeholder”, for Format select “Text”, and in the Placeholder box type “Name of person”.

Insert Name Prompt Field in Fields dialog box

Click “Insert” and you will place this field in your document. It prompts you to enter the name of the person you are writing to, and in your document when you type here it will replace the placeholder text with whatever you type. Note again that because this is a field it has a gray background.

I then hit Enter 2 times to insert blank lines, and then I will insert another Placeholder text field as above, only this time I will call it Type Letter Here. This is the area where the text of the letter will go. Then I hit enter 2 more times, and then I press tab 7 times, and type “Sincerely,”. I then hit Enter 3 times to leave a space for my signature, then tab 7 times again for my typed name. I hit Enter again, then tab 7 times, and put in my street address. I hit enter one more time, then tab 7 times, and finish my address.

Now, to turn this into a template I need to go to File–>Templates–>Save, and give it a name. I ave it in My Templates, and I can then copy it to any other computer using LibreOffice and it will be available there as well.

To use this to create a letter, just go to File–>New–>Templates and Documents, Select the My Templates folder, double-click to open the folder, and select your Letter template. Then click Open and you will have a letter ready to go. Here is what it will look like when you open a new document:

New Letter created from the sample template

If you want to see a copy of this template I created you can download it from here.