6

I have a certain template file for LO Writer.

How can I edit that file directly, i.e. not by creating a new .odt file and saving it as a .ott file again?

This question is based on the following experience: under Windows, it is possible to right-click the file and choose something along the lines of Edit this file, which then open the .ott-file itself instead a blank new document.

1

4 Answers 4

4

Like most LibreOffice file formats, the .ott file is just a compressed archive. Rename it to filename.zip and open it with the archive manager. You will find several files and folders in it. Most likely you want to edit the contents.xml file. When you're done, compress the files and rename the file to newfilename.ott. Unless you have made a mistake somewhere, you can open this file with LibreOffice. LibreOffice is not very lenient towards errors in the XML markup, and will refuse to open the file if you forget to close a tag, for instance.

1
  • This does not help. I amended my op to clarify the issue.
    – henry
    Feb 5, 2015 at 16:10
4

LibreOffice supports the -o command line parameter which does exactly this:

       -o file...
              Opens the given files for editing, even templates.

              Without -o a template file would create a new document derived from that template.

Unfortunately there is no shortcut in the file manager to access this functionality. But I guess you could add your own .desktop file which does this; or you could edit /usr/share/applications/libreoffice-writer.desktop and manually add the -o parameter to the Exec= line.

Alternatively you can run libreoffice -o MyTemplate.ott command in Terminal to edit the MyTemplate.ott file.

3

Select

  1. File -> Templates -> Manage

  2. Click on the template of interest.

  3. Click the 'Edit' button that appears in step 2).

If your template doesn't appear in the list of templates then you may need to import it.

  • File -> Templates -> Manage

  • Click the 'Import' button.

1

The best solution I've found is to open the template file you want to edit; this gives you an "Untitled 1" document.

However, you can edit this and save it over the old template file.

It's not as slick as using Microsoft Word on Windows, but it accomplishes essentially the same thing.

1
  • This works but is not intuitive at all. I recall some menu option to "edit as template" or similar, but it seems to have vanished...
    – holmb
    Jun 14, 2017 at 13:32

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .