OpenOffice.org Templates
The Easy Way to Create New Documents
by Charles Olsen

If you do a lot of work in OpenOffice.org Writer, chances are that you prepare many documents of a similar format. If you're not using templates to create these documents, you may be doing a lot of extra work.

A lot of what I write in this article will also apply to other office application suites, including Microsoft Office. But the exact details will be different with Microsoft Office and other programs.

This article will apply to OpenOffice.org (OOo) on both Linux and Windows -- and possibly on Mac, but I don't have a way to verify that.

What is a template?

A template is simply a document that serves as a model when you're creating new documents. It has margins, fonts, styles, and can include text and graphics that you want to have included in your documents.

OOo uses templates for all its documents: word processing, spreadsheet, presentation and drawing. When you create a new document, it will use the default template for that type of document unless you specify another template to use. Out of the box, the default templates are blank. They'll have margins and fonts, but will not include any text or graphics.

Why Use a Template?

Once you have templates set up, they can make your life easier. For example, if you send a lot of letters, you can have a template that includes your name and contact info, a graphic logo, has set the font that you want to use, and includes placeholders to show where to put the new text.

One template that I've used a lot in the past is for magazine articles. When you're submitting articles to magazines, there's a specific format they want to see. You need to have the margins set to a certain size, with specific text in specific locations, and using a particular kind of font.

(The Courier 10 Pitch font that comes with Linux Mint and most other distros is a really good font for this. Set the size to 12 point, so that it's printing 10 characters per inch. The Courier New font that comes with Windows is kind of wimpy -- a better one is this free Dark Courier font from Hewlett Packard: http://tinyurl.com/2g2a3).

If a writer fails to follow this specific format, it tells the editor that this writer does not pay attention to detail. If the writer isn't paying attention to detail, then how can you know that the information in the article is correct? By using a template, you know that all the formatting will be correct and you're free to focus on the content.

At the company where I work, we send a lot of letters that have legal impact. The exact words you use, and the exact phrasing, can make a big difference. So we use templates for most of the letters we send. Many of our templates already have the text which has been reviewed and approved by our legal department, so we just have to fill in the name and address, and other info like the account number and specific amounts. Using templates keeps us consistent on the messages we send.

Or if you have a report that you create regularly -- weekly, monthly or whatever -- you can have a template in Word Processor or Spreadsheet or Presentation that has the format set up, as well as headings or titles or any other text that needs to be there each time.

You can see that using templates can make your life easier, can make your documents consistent and even help keep them legal.

How To Create a Template

There's more than one way to create a template. I'm going to talk about the process I use, but this is not the only way to get it done.

The best way is to start with a document you've already created, where everything is set up exactly the way you want it. Then you just need to remove the text that would change each time. I'll use the example of creating a template for magazine articles.

I'd start with an article that had everything set up correctly:

  • Margins are set
  • Appropriate font has been selected
  • No page number on the first page
  • My last name and the page number on all the rest of the pages
  • Top of the first page on the left is my name and contact information
  • Top of the first page on the right is the word count, copyright notice and rights I'm selling
  • The title, centered and all uppercase
  • The byline
  • Halfway down the first page, the article begins
  • At the end, after the article content, it has the words "The End" centered on the page

The first thing I'd do is click File > Save As and give this file a new name. Since I'm going to be deleting most of the text from the article, I don't want to take a chance that I would accidentally overwrite the original article with a mostly blank file.

Now I'm ready to start turning this into a template.

I'd take this article document and delete the actual article content. Start with the beginning of the actual article text, and stop just short of where it says "The End."

Where the title is written in all caps and centered on the line, I'd delete that and just write the word TITLE in all caps and centered. That shows me where to put the title, and how to format it.

At the top where it lists the word count, I'd delete the actual number and replace it with x,xxx to show where the number goes

That's all there is to it -- now I have a perfect file for a template. I just need to save it.

Where are Templates Stored?

The default template location can vary from one Linux distribution to another, between different versions of OpenOffice.org, and of course the Windows version will have a different location than the Linux version. The best thing to do is launch OOo and see where they are stored on your PC.

In OOo, click the Tools menu and choose Options.

On the left, under OpenOffice.org, choose Paths. On the right, click Templates and click the Edit button.

You'll see one or more paths listed. In a default install of Linux Mint 6, the path marked as the Default is /home/user name/.openoffice.org2/user/template.

If you want to work with the default, this is the folder where you'll save the template file.

I prefer not to use this location, because I don't like storing them in a hidden folder. Since one of the levels of the folder name starts with a period (.openoffice.org2), it will be a hidden folder. So I would create my own folder called Templates, under /home/user name.

Then I go into the options in OOo, to the Templates path and click the Add button. It brings up a window where I can select the folder. If you haven't already created the new Templates folder, you can create it here and then select it. Click OK until you get back to the document.

Now you can save the file as a template. Click File > Save As.

For the document type, click the drop-down and choose ODF Text Document Template (the extension is .ott). If you're doing something other than a word processing document, then select the appropriate template for that type of file.

Now, give the template a name and select the location where your templates are stored. Once you save it, that template is now available for you to use.

To create a new document using that template, in OpenOffice.org just click the File menu, choose New, then choose Templates and Documents. All your templates will be listed there, including the new one you just saved.

And that's all there is to creating and using templates.

Other Considerations

When you're creating a new template, be sure to test it with multiple pages and make sure your page numbers look the way you want. Some documents have no page number on the first page, and numbers on all the rest of the pages. If that's what you're doing, make sure to test your template to at least two pages.

Or you might even have three different types of page numbers -- for example, if you have no number on the first page, and different locations for the numbers on left and right pages. You'd want to test that template to at least three or even five pages, so that you'd have a first page, left page and right page.

Once you know the page numbers are coming out correctly, you can delete the extra text and bring it back down to one page.

If you do need to test it to two or three or five pages, there's an easy way to enter sample text in OpenOffice.org Writer. Just type the letters dt and press F3.

This is an Autotext entry that is set up by default in OpenOffice. It will enter 291 words into your document. The text reads like the beginning of a story -- and not a particularly good one -- but you don't really care what it says, just that it makes it easy to see how your formatting would work out with a chunk of text. You can repeat the process if you need to fill out more of your document.

This DT autotext entry is not in Microsoft Word, which I have to use at the office. But I've found this to be so useful in designing documents that I've added this into Word on my work PC as an Autotext entry.

So, if you create documents in OpenOffice -- any kind of document, whether it's a word processing file, a spreadsheet, presentation or drawing -- templates can make your life easier. With templates you can save time, save effort, and keep your documents consistent.

Charles Olsen is a writer, trainer and IT professional. He can be reached at charles.olsen@pobox.com. See more articles at and listen to the mintCast podcast at http://mintcast.org.

© 2009 by Charles M. Olsen