How to protect a template in Writer

How do I protect a new template in Writer so that I can edit or add what I need to but then be forced to Save As with a new name rather than accidentally save the altered template?

You can use the operating system tools to set the Read Only attribute for the template.

1 Like

You have not mentioned OS name, LO version nor save format.

From your description I assume that you use word template in its layman dictionary meaning, i.e. a pre-filled document you then customise to the real case.

Writer has a special document type with extension *.ott (=Open Template Text ) instead of usual .odt (=Open Document Text). Such documents have the special property that Writer opens them as Untitled1.odt, changing both name and extension, so that the “accident” does not happen.

You create such “technical” templates with File>Templates>Save as Template. And this menu command registers your new template with Writer which makes later use “integrated” with LO. More on that below.

There are two ways of using .ott templates:

  • double-click on the template icon
    This opens a new document with initial contents (and styles) from the template. But Writer “forgets” that the source was a template. The document is just a standard one.
  • File>New>Templates
    You can choose one of the known (“integrated”) templates. A new documents opens with initial contents and styles from the template. However, Writer “remembers” that this document is associated with the template. If you later modify template styles, the document can be updated on reopen to match the new version of styles. This is very handy when styles represent your company or personal graphical charter. Any evolution is forwarded to associated documents.

“Integration” of templates with Writer has also a big advantage: you can designate a template as your preferred default template (to supersede the factory default template which, in fact, is a “no-specific” or “neutral” template). File>Templates>Manage Templates and right-click on one of the known template to Set as Default. Once this is done, File>New>Text Document automatically references your custom default template.

Note that under Window$, creating a new file from the desktop does not reference your custom template (because it simply creates an empty file).

File>Templates>Save as Templates saves your template in a LO-private directory (there is one such directory per user plus a system-wide directory). This directory may be hidden or located quite deep in the file system and this makes maintenance/update of the template quite tedious because it may be difficult to located it.

It is then preferable to designate one of your user sub-directories as your preferred storage locations. Under Linux, every user home directory has a Templates directory (defined by environment variable XDG_TEMPLATES_DIR) with name Templates in English locales and translated in other locales. You can force LO to save the templates in this directory by adding it to the list in Tools>Options, LibreOffice>Paths, Templates entry. Tick the radio button to make your preferred default.

1 Like

I originally created a .docx which included some .jpg graphics. When I save it to .ott and then open the template, some of the graphics have vanished. Any idea why?
Sorry, I am using W11 and LO V7.6.5.2

DOCX and ODF are not identical standards. Saving from one to the other requires translation and approximations for non-existing primitives in the target format. I can’t tell without analysis. Perhaps some of the images have been offset outside the visible part of the page.

1 Like