Ask Your Question
0

How do I assign a template to a document?

asked 2016-05-04 01:24:39 +0100

Arskin_Fertrubble gravatar image

updated 2016-05-04 01:33:00 +0100

I know that Libreoffice has a template directory and that it differentiates between template documents and working documents.

I also see there is a menu option Files > Templates > Assign Template to current document

However, the menu item has no effect. It prompts me to select the template document, but the template is not applied.

So, how do I assign a template to my document?

Thanks

edit retag flag offensive close merge delete

Comments

Bump......

Arskin_Fertrubble gravatar imageArskin_Fertrubble ( 2017-01-19 08:03:01 +0100 )edit

2 Answers

Sort by » oldest newest most voted
0

answered 2018-06-01 02:26:29 +0100

ChasVA gravatar image

From the LibreOffice Writer 5.4 Guide, Chapter 10, Working with Templates, pp. 227–228:

Associating a document with a different template

At times you might want to associate a document with a different template, or perhaps you’re working with a document that did not start from a template.

One of the major advantages of using templates is the ease of updating styles in more than one document, as described in Chapter 9, Working with Styles. If you update styles in a document by loading a new set of styles from a different template (as described in Chapter 9), the document has no association with the template from which the styles were loaded—so you cannot use this method. What you need to do is associate the document with the different template.

For best results, the names of styles should be the same in the existing document and the new template. If they are not, you will need to use Edit > Find & Replace to replace old styles with new ones. See Chapter 2, Working with Text: Basics, for more about replacing styles.

1) Use File > New > Templates. In the Templates dialog, double-click the template you want to use. A new document opens, containing any text or graphics that were in the template.

2) Delete any unwanted text or graphics from this new document.

3) Open the document you want to change. (It opens in a new window.)

4) Use Edit > Select All, or press Ctrl+A, to select everything in the document.

5) Click in the blank document created in step 1. Use Edit > Paste, or press Ctrl+V, to paste the contents from the old document into the new one.

6) Update the table of contents, if there is one. Close the old file without saving. Use File > Save As to save this new file with the name of the file from which content was taken. When asked, confirm you wish to overwrite the old file. Or, you may prefer to save the new file under a new name and preserve the old file under its original name.

Caution

Any changes recorded (tracked) in the document will be lost during this process. The resulting document will contain only the changed text.

edit flag offensive delete link more

Comments

This is one area where I think OpenOffice Writer outshines LibreOffice. It is much easier to assign a template in OO via the menu item of that name. I would suggest assigning the template in OO and then editing in LO if you must.

ChasVA gravatar imageChasVA ( 2018-06-01 02:28:37 +0100 )edit

The procedure given above is akin to create a brand new document with loss of some information (such as history). When in need, I use a workaround which is not for the faint of heart.

I save my doc as .fodt (flat XML) and I edit manually the code to alter the reference to the template (caution, the template location is some path relative to the current document). For unknown reason, I sometimes need to alter the template date for the change to be noticed by LO.

ajlittoz gravatar imageajlittoz ( 2018-06-01 08:37:04 +0100 )edit
0

answered 2016-05-06 16:02:28 +0100

akurery gravatar image

Are the paragraph and character styles of your document named the same as the ones of the template?

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2016-05-04 01:24:39 +0100

Seen: 496 times

Last updated: Jun 01 '18