Template Changer

Provider:
André Schnabel
Maintainer:
andreschnabel
Rating:
4.29412
Average: 4.3 (17 votes)
Application:
Writer
Tags:
template, styles, formatting
Screenshots:
http://users.ooodev.org/~sca/templatechanger_batch.png
Post date:
Sunday, 4 November, 2007 - 06:40
Statistics
Week: 62 - Month: 211 - Year: 3,319 - Timeline
Download extension
System Independent version - All releases
Compatible with OpenOffice 4: Unknown
User feedback:
Compatible with OpenOffice 4.x?

This extension will add two new items to the File - Templates menu that allows to assign a new template to documents. All styles and formatting will be loaded from that template and the documents will behave as it was created using that template.

New menu items are:

  • File - Templates - Assign template (current document)...
  • File - Templates - Assign template (folder)...

This behaviour has been requested in Issue 52783.

The extension itself is localized to Danish, Dutch, English, French, German, Italian, Russian, Serbian and Spanish. The new batch mode is not fully localized yet.
If you like to help with translation, just unzip the extension (it is actually a zip file). You'll find README_translation.txt with instructions and tc_l10n.ods with the strings. If you have questions, please drop me a mail.

Template Changer

Version Operating system Compatibility Release date
1.2.6 System Independent 3.1, 3.2, 3.3, 3.4 26/01/2011 - 09:22 More information Download
1.2.5 System Independent 2.x, 3.0, 3.1, 3.2, 3.3, 3.4 13/09/2009 - 12:21 More information Download
1.2.4 System Independent 2.x, 3.0, 3.1, 3.2, 3.3, 3.4 28/06/2009 - 09:45 More information Download
1.2.3 System Independent 2.x, 3.0, 3.1, 3.2, 3.3, 3.4 01/12/2008 - 13:48 More information Download
1.2.2 System Independent 2.x, 3.0, 3.1, 3.2, 3.3, 3.4 08/10/2008 - 04:24 More information Download
1.2.1 System Independent 2.x, 3.0, 3.1, 3.2, 3.3, 3.4 20/09/2008 - 14:54 More information Download
1.2.0 System Independent 2.x, 3.0, 3.1, 3.2, 3.3, 3.4 17/09/2008 - 14:36 More information Download
1.1.1 System Independent 2.x, 3.0, 3.1, 3.2, 3.3, 3.4 05/09/2008 - 06:44 More information Download
1.1.0 System Independent 2.x, 3.0, 3.1, 3.2, 3.3, 3.4 02/08/2008 - 16:00 More information Download
1.0.0 System Independent 3.4 13/07/2008 - 15:26 More information Download
0.7.0 System Independent 3.4 06/07/2008 - 11:26 More information Download
0.6.0 System Independent 3.4 25/05/2008 - 13:38 More information Download
0.5.0 System Independent 3.4 06/05/2008 - 13:19 More information Download
0.4.0 System Independent 3.4 18/11/2007 - 06:25 More information Download
0.3.0 System Independent 3.4 11/11/2007 - 06:43 More information Download
0.2.0 System Independent 3.4 04/11/2007 - 06:41 More information Download

Comments

Will there be a version for OOo 4.0 or LO4.0 and 4.1?
Would be verry helpfull for me.
Thanks

Siggi

Hi all!

I am trying to assing a template to an existing Impress document. It worked fine with Text documents but it is not working with Impress.

The first problem is that the item "Assing template (current document)" is not available.

The second problem is when using "Assign template (folder)". First of all, I have to select the template for the first entry. I can chose within:
- text templates (*.ott, *stw)
- ODF Text Template (*.ott)
- OpenOffice.org 1.x Text Template (*stw)

But the template has ".otp" extension (none of the above)! Any suggestion?

Thank you!!

[OpenOffice 3.3.0 on Windows7(?)
OpenOffice 3.2.1 on WindowsXP]

Hi,

I tested the Template Changer extension and it changes the template, but it doesn't adds template macros in the document. Can I add or update the template macros in any way?

Thank you very much.

I've loaded this extension through the manager as a zip file. However, only one menu item appears, Assign Template (folder). The other doesn't appear. I've loaded it on OO 3.3.0 with Windows XP and 7 with the same results on both. What could I be doing wrong?

When you open OOo interface or quick start, one item appears: Assign template (folder)...
But, when open Writer or OOo Text Document, the second item also appears: Assign template (folder)...
and i use 3.4

When I click Assign (current) I'm getting a file selection dialog instead of the template list. I'm fairly sure this was working when I first installed it. Tried uninstall/reinstall, no difference.

OOo 3.3.0, Windows 7.

I also recently installed the Writer2Epub extension. Possible conflict?

It's always a file browser not a template list. but to browse for template, so navigate to your templates location and note the type of file the browser is seeking (ott and stw)

I tried to install the latest release of Template Changer on my install of OpenOffice 3.1 under Ubuntu 9.10. It failed with the error message:

Can not activate factory because java.io.FileNotFoundException /usr/lib/openoffice/program/../basis-link/program/classes/LuceneHelpWrapper.jar (No such file or directory)

However, after I installed openoffice.org-java-common with apt, the extension installation succeeded.

I installed this extension on a machine with Go-oo 3.01 and Win Vista. It seems as if this extension may be in conflict with other extensions. When I first installed it, I had trouble to install the extension for Zotero. When I had it installed I was unable to deactivate or remove any other extensions. I got long series of error lists. I had to uninstall/reinstall oo. I tested the extensions by installing them one by one and it seems that it is this extension that is the problem.
Of course I may be wrong and the error could be due to other conflicts or other software on my computer, but as far as I was able to test, it looked as if the problem was with this extension. I think it is a very good extension and I will watch out for updates and try to use it again!

can you please tell me one or two extensions where the conflict is visible .. and send me a log of the errors you get?

After some testing, it seems that header and footer do not appear if the first page of an assigned template is marked as "First Page" style.
If it is marked as "Default", it works normally, but it is not convenient. By the way, this is a problem in OO, because it is easier to click "Different First Page" that to think about those styles.

Hi,

you are corerct - this is more related to the concept of using different page styles in OOo. Template Changer only updates the styles - and does change how the styles are used in your document.

If you look for something that makes it more easy to deal with different header / footer on first page, try the pagination extension.

Thank you for your comment.
I use Pagination for page numbers, and it creates different first page, but here is a different problem: when I type a document, I want to print it with the memo containing header and footer on a first page only. If my template does not contain First Page style, it's not really useful.
For this reason, it would be nice if styles could also be applied.

Nice job!
The menu items are not translated in french:

  • "Assign template (current document)" would be "Assigner au modèle (document courant)"
  • "Assign template (folder)" would be "Assigner au modèle (répertoire)"
  • In dialogbox, the caption checkbox:

  • "Document texte ODF (*.odt)"
  • "ODF master documents" would be "Document maître ODF"
  • This great extension is a must-have for OOo writer v2.x.
    Now I can re-enable the auto style update with a template for my documents.

    v1.1.0 of this extension can work with my OOo writer 2.4.1 packaged for debian sid .

    I am using Fedora 8 with the OpenOffice packages from the distribution, version 2.3.0-6.15.

    I installed Template Changer as root as an OpenOffice.org extension so all users could use it. It installed, enabled, and worked for root. It appeared in the list of extensions for a normal user but did not work. When the Tools -> Extension Manager was opened, the Template Changer status was "Unknown." When expanded, Addons.xcu was enabled but TemplateChanger was Disabled.

    I uninstalled Template Changer as root as an OpenOffice.org extension and installed as a normal user as a MyExtensions extension and it enabled and was usable.

    This brings up a suggestion. The File -> Templates ->Assign new brings up the local template directory for the user. This extension would be far more user friendly if it brought up the OpenOffice "Templates and Documents" menu so that all the templates are easily available instead of just the user templates.

    Thanks for your hard work.

    For the installation problem:

    this seems to be a problem within OOo 2.3. I could verify the issue using 2.3 but all is fine using OOo 2.4 (or 3.0beta). If have problems with OOo 2.4 (an newer) pleas tell me.

    To your suggestion:
    Yes, I thought about this - it would be very usefull to have a better selection of tmeplates. The problem is, that the current "Tempalte and Documents" Dialog cannot be used as simple "File selector" - there are to many options in this dialog that could break the functionality of the simple task to change a template.
    So - I'd have to write my own dialog implementation. If I did, I'd like this implemantation as easy as possible (from a users perspective) but it should give all the features a user needs in this case. This means - access to all installed templates (what can be a lot) plus access to files.
    Hmm .. maybe something for TemplateChanger v1.2 (although i far that this would be overkill).

    André

    André

    I am running OOo_Dev300_m14_MacOSIntel and have installed Template Changer 0.6.0

    When I run «Assign New…» nothing appears.

    I then went to Tools->Macros->Run Macro…->My Macros->Template Changer->Template Changer ,
    and then tried to run ChangeSystemFileDialog
    This produced an error msg: «A Scripting Framework error… Message: wrong number of parameters»

    What do I do now?

    Thanks
    Al Maloney

    Unfortunately this seems to be a problem of the Aqua-native port of OOo. It is not possible to open the native file picker from a Basic macro at the moment. Even worse - there will be no error information given to the makro.

    I cannot do much about this - only workaround is, to configure OOo to use it's own file dialogs. This needs to be done manually.

    See issue 90219

    Update: fixed in TemplateChanger 1.0

    i make a new template, than i use the record macro and assign my template with this extension and record nothing !!! can you help me ? tnx

    Hi,

    the extension actually is a macro. Once you installed the extension, you can use tools - makros - manage - makros ... .Look for the library TemplateChanger. The code you need is in module TemplateChanger - Main.
    It should be quite easyto read and adopt the code - it's really no great secret.

    As the extension is under LGPL, you can reuse the code according to the license.

    André

    yes i find ... :) now i try to make someting with that code, for me its not easy because i dnt now the language ...
    tnx

    laur

    Using this in a Magazine Editorial department. In the past it was necessary, when getting content from outside sources, to open a new document in the default Editors template, copy the text from the outside source and then Paste Special>Unformatted Text into the new Document.

    Now it's simply Open with writer, click "Assign Template" and select.

    Brilliant. Thanks Andre

    Hi Yorick,

    I'm also using OO for editorial work and dealing with documents from outside sources (mostly Word). I thought this extension was just what I've been looking for, but it doesn't seem to work for me (I'm probably doing something wrong!) I open a document in OO (usually drag and drop) and go to 'Assign New Template'. I select my editorial template (very simple, only a few styles) and ... nothing happens. I've tried selecting all of the text first, and I've tried selecting the text afterwards and selecting a style, but neither applies my 'new' styles to the document. Does it sound like I'm getting it wrong here? Thanks for any light you can shed on this!

    Hi Bob,

    that's strange - at least the new styles should show up in your document. You do not need to select any text beforehand.

    Can you send me one of your templates and one of the documents, so that I can test it?

    André

    When a document is created from a template the Document Properties show which template it is created from. Presumably this is what enables OOo to prompt for style changes in the document when the template's styles are changed.

    This extension adds much needed functionality, but it simply deletes the template listed in the document properties, rather than changing it to the new template. It seems to me that the extension would be a lot more effective if it actually changed internally the template on which the document was based.

    Hi,

    the template changer actually does, what you suggest and it does it exactly the way OpenOffice.org operates (what is a little confusing).

    1st: In file properties, the Title of the template, not the file name is displayed. So, as long as your template has no Title, this will not be visible in the file's properties.

    2nd: OOo loads styles from a changed template only, if the template is in the OOo template paths. This means, it must be either one of OOo's default templates or you need to put it under MyTemplates.

    If these conditions are met, but the styles still get not updated, please send me the affected files and I'll have a look.

    Thank you. I have assigned titles to my templates and they now appear!

    Given a blank template title, Writer defaults to the file name, when it creates the document from the template. The new code should probably do the same.
    TJ Frazier

    Hi,

    I succesfully installed the extension and got the new toolbar. however, when i select 'assign new template' nothing happens. I assume a box must open so you can select a new template.

    i am using v 2.3.1 on Windows XP

    any help would be appreciated.

    Wayne Glover

    I had the same problem. When I downloaded the extension it was a zip file, which I unpacked. I then pointed the extension manager to the .xcu file and got the new toolbar (which did nothing).

    I then uninstalled the extension, changed the zip file´s extension to .oxt and installed again. This time it worked fine.

    Perhaps the people who maintain the site could change the extension from .zip to .oxt!

    The extension actually has an .oxt filename extension. This might be a misconfiguration of the the browser or maybe the server. I'll ask at the extension-site mailing list.

    btw. as workaround, you can open the .zip file directly in the extension manager. This way should always work.

    I've installed but the menu option does not show. Yes, I'm using the latest Openoffice.org version.

    NTP

    Can you tell the exact version of OOo (e.g. if it is a Linux-Distribution version, OOo-Build, Oxygen Office or "original" one) and your localization?
    Please verify, if the extension is activated.

    Thanks,

    André

    Hi André

    Button "activate" is disabled after installing extension on my Ubuntu 7.04 with OOo 2.2.0.
    I did some modification and russification. Now it is work for me.
    Check e-mail.

    Konstantin.