Template Changer

(10 votes)

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.

Download extension
Operating System: System Independent
Compatible with: OpenOffice.org 2.3 | StarOffice 8 Update 8 or higher.
Official release: 1.2.2
Date: 2008-Oct-08
Size: 73.99 KB
License: opensource | Read license
Further product information: Screenshots | Product details
Provider: André Schnabel

Comments

Wrong french localisation

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"
  • I love this extension

    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 .

    Installation/Enable issues & suggestion

    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.

    Installation/Enable issues & suggestion

    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é

    Scripting Framework error

    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

    TemplateChanger on Mac

    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 want to use this extension in a macro

    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

    using the extension (code) in a makro

    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é

    hi,

    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

    Excellent extension

    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

    Help!

    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!

    Help!

    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é

    Suggested improvement

    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.

    Connecting to the template

    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.

    Template title displays!

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

    Template titles

    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

    Template Titles

    Yes - you are right (did this change recently?)

    I'll upload a new version that implements it the same way.

    André

    I have trouble getting it to work

    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

    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!

    .zip or .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.

    Great idea but.............

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

    NTP

    Version ond localization?

    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é

    Extension could not be activate

    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.