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

Using them, Making them, Finding them
Post Reply
ptoye
Posts: 225
Joined: Mon Apr 21, 2008 11:07 am
Location: Reading, England

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

Post 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?
Last edited by thomasjk on Thu Aug 22, 2013 5:59 pm, edited 2 times in total.
Reason: Added green check mark
Peter
OO 4.1.1 on MS Windows 7 64-bit
User avatar
RoryOF
Moderator
Posts: 34586
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Write is opening the wrong template

Post by RoryOF »

I'd suggest replacing the spaces in the names by underscores.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
ptoye
Posts: 225
Joined: Mon Apr 21, 2008 11:07 am
Location: Reading, England

Re: Write is opening the wrong template

Post 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?
Peter
OO 4.1.1 on MS Windows 7 64-bit
User avatar
acknak
Moderator
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: Write is opening the wrong template

Post 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.
AOO4/LO5 • Linux • Fedora 23
ptoye
Posts: 225
Joined: Mon Apr 21, 2008 11:07 am
Location: Reading, England

Re: Write is opening the wrong template

Post 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.
Peter
OO 4.1.1 on MS Windows 7 64-bit
User avatar
acknak
Moderator
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: Write is opening the wrong template

Post 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.
AOO4/LO5 • Linux • Fedora 23
ptoye
Posts: 225
Joined: Mon Apr 21, 2008 11:07 am
Location: Reading, England

Re: Write is opening the wrong template

Post 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
Peter
OO 4.1.1 on MS Windows 7 64-bit
User avatar
acknak
Moderator
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: Write is opening the wrong template

Post 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.
AOO4/LO5 • Linux • Fedora 23
ptoye
Posts: 225
Joined: Mon Apr 21, 2008 11:07 am
Location: Reading, England

Re: Writer is opening the wrong template

Post by ptoye »

I see what you meant! Thanks.
Peter
OO 4.1.1 on MS Windows 7 64-bit
Post Reply