Page 1 of 1

Change The Styles Template for Existing Document

PostPosted: Sat May 03, 2014 3:10 am
by AutoNow
So I just spent 45 minutes or more creating a custom styles template. It works fine when I open up a new document they all conform to my new styles. How do I make the document that was already half written use these new styles?

I need this to work for existing document, not just future new ones. :x

Re: Change The Styles Template for Existing Document

PostPosted: Sat May 03, 2014 10:17 am
by floris v
There are a few things to keep in mind here:
* Templates are used for more than styles - for instance page size and orientation can also be affected, but such settings aren't adjusted if you import the styles from a styles template.
* If you defined custom styles with custom names, they will not automatically be applied.
* If you want to apply a template to an existing file, the easiest way *may* be to start a blank document with that template, then copy/paste the content of the existing document into that new document.
* Please remember that direct formatting always overrides style formatting, so if your existing documents contain much direct formatting, just importing a lot of styles from a template or pasting a file into a blank document isn't going to help you. You will need to edit your documents to apply those custom styles where necessary.

Re: Change The Styles Template for Existing Document

PostPosted: Sat May 03, 2014 12:33 pm
by AutoNow
Here's my conundrum:

I can start a blank document and when I select text and click the header style or any of the other ones that i've set the text changes to fit my newly define header styles. This only works in documents that I have created since defining my custom styles template.

In my pre existing document (and preformatted, thus in need of change), those same style selections for headers 1-10 do not apply the new styles that now work in all new documents, they apply the old styles from when that document was created. Is there a way to override the old style settings so that when I click "Header 2" style for some selected text it will apply the same style that is now my default new document styles, or is my entire document stuck in the stone age with the original styles?

This is like a book, an educational book with all sorts of different heading types. Going through it and manually changing FIVE formatting settings for each and every single instance of a header could take 1-2 days! Surly openoffice allows for removing the original template styles of the document and replacing them with the new defaults SOMEHOW... right? Or no?

Re: Change The Styles Template for Existing Document

PostPosted: Sat May 03, 2014 1:35 pm
by floris v
You can try if a master document can help you out there. Define the styles in the master document as in the custom template that you made - I think that if you have the master document and the template open simultaneously, you can import styles from the template in your master document. Then insert the documents with the old styles with the same names as the new styles (that's important) and then the master document with the old files inserted will look as desired.

Re: Change The Styles Template for Existing Document

PostPosted: Sat May 03, 2014 1:37 pm
by Bill
AutoNow wrote:Surly openoffice allows for removing the original template styles of the document and replacing them with the new defaults SOMEHOW... right? Or no?

If you just want to replace the styles and not apply the new template, then open Styles and Formatting (press F11). Click the arrow on the rightmost icon at the top of the Styles and Formatting window and select "Load Styles". In the Load Styles dialog, select your template. Check the types of styles you want to replace and the Overwrite option. Click OK.

If you want to apply the new template to the old documents, there is no option to do this in AOO. There is a Template Changer extension, but it may not work with AOO 4+.

floris v wrote:* If you want to apply a template to an existing file, the easiest way *may* be to start a blank document with that template, then copy/paste the content of the existing document into that new document.

This is a workaround for applying templates to old documents. You could try this or open a new document based on the new template, then use File > Insert to insert the existing file in the new document.