Page 1 of 1

[Solved - sort of] Writer is opening the wrong template

PostPosted: Thu Jul 18, 2013 7:08 pm
by ptoye
Write appears to open different templates, depending on whether they're opened via a macro or manually.

In my user templates directory there were 2 files: RU Invoice.ott and RU Invoice1.ott. Using the template organiser I deleted the latter, but the file didn't disappear. When I open a new file using "RU Invoice" I got a document which looked as though it were based on "RU Invoice 1.ott". If I open a new document using a macro I get the correct document.

Even if I rename the file to "RU Old Invoice.ott" I still get the wrong document, even after shutting down OO and relaunching it.

Anyone got any idea about what's going on here, and how I can get the correct template to open manually?

Re: Write is opening the wrong template

PostPosted: Thu Jul 18, 2013 7:17 pm
by RoryOF
I'd suggest replacing the spaces in the names by underscores.

Re: Write is opening the wrong template

PostPosted: Thu Jul 18, 2013 7:42 pm
by ptoye
I assume you mean renaming the file (I can't see how to rename a template in the Organiser). It doesn't work - I still get the wrong one.

The only way I can do it is to remove the file from the directory.

I can't work out what the connection is between the templates as seen in the Organiser and the template files in my user Appdata/..../templates directory. Do you happen to know?

Re: Write is opening the wrong template

PostPosted: Thu Jul 18, 2013 7:48 pm
by acknak
I think the problem comes from changing the files directly, whereas the template system maintains it's own registration (connecting template names to their files) and, I believe, making a separate copy of the template files themselves. To keep everything consistent, all template management must be done through the File > Templates pathway, and not by manually changing files.

Not that you have to use the template management--you can use nothing but plain template files and do the management manually--but then you don't get the benefits of OOo helping you out with menus and template-document connections.

Re: Write is opening the wrong template

PostPosted: Thu Jul 18, 2013 8:13 pm
by ptoye
I don't think it can be making a copy of the template, as moving it completely out of the directory seems to stop OO from finding it.

I take your point about OO having its own registration system - but how can one get into it as the available manipulations in the Template Organiser are so limited - you can't even rename a template. There's the "update" function which, as far as I can see, has no effect. According to the help file it "Updates the contents of the lists", whatever that may do.

Anyway, I've solved the issue by taking the offending template out of the directory, but I have a nasty feeling that if I put it back I'll get the problem back again.

Re: Write is opening the wrong template

PostPosted: Thu Jul 18, 2013 8:43 pm
by acknak
ptoye wrote:... how can one get into it as the available manipulations in the Template Organiser are so limited - you can't even rename a template. ...

Maybe import an existing template and give it a new name, then delete the old template?

However, that might break the links contained in any documents made from the old template; I don't know.

Re: Write is opening the wrong template

PostPosted: Wed Aug 21, 2013 8:43 pm
by ptoye
acknak wrote:Maybe import an existing template and give it a new name, then delete the old template?


But how do you rename a template? That facility isn't in the organiser. And I've been warned off renaming the file already

Re: Write is opening the wrong template

PostPosted: Wed Aug 21, 2013 8:57 pm
by acknak
ptoye wrote:... But how do you rename a template? That facility isn't in the organiser. ...

I don't think it's possible to rename a template, exactly. At least I don't see any way to do it without digging into the OO settings data.

On the other hand, it doesn't seem all that critical a feature.

If you just need a copy of an existing template under a different name, all you have to do is File > Templates > Organize; select the template, Commands > Edit.

With the template open for editing, do File > Templates > Save and give it a new name.

You should now have a new copy of the template that you can change independently and use for new documents.

Re: Writer is opening the wrong template

PostPosted: Thu Aug 22, 2013 10:48 am
by ptoye
I see what you meant! Thanks.