Name of new document when opening template

Discuss the word processor
Post Reply
tropemil
Posts: 9
Joined: Sat Jul 01, 2017 9:11 pm

Name of new document when opening template

Post by tropemil »

Hello everyone.

Can I specify in a template the name of the new document when it opens?

That is to say when opening the .ott, a "Untitle 1.odt" is created, that instead of "Untitle 1" appears the text that I decide.

And the default folder when you click save?

Thanks in advance.
OpenOffice 4.0 on Ubuntu and Windows / LibreOffice 5.1 on Ubuntu and Windows
User avatar
robleyd
Moderator
Posts: 5087
Joined: Mon Aug 19, 2013 3:47 am
Location: Murbko, Australia

Re: Name of new document when opening template

Post by robleyd »

You can set the default location for saving (all) documents in Tools | Options | OpenOffice | Paths - click on My Documents and select the Edit button; you can then navigate to the directory you want to set as the default save location.

I am not aware of any way to change the default document name of Untitled n when you open a new document either from a template or otherwise.
Cheers
David
OS - Slackware 15 64 bit
Apache OpenOffice 4.1.15
LibreOffice 24.2.2.2; SlackBuild for 24.2.2 by Eric Hameleers
User avatar
RoryOF
Moderator
Posts: 34618
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Name of new document when opening template

Post by RoryOF »

Were this possible, every document opened from that template would have the same name.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
tropemil
Posts: 9
Joined: Sat Jul 01, 2017 9:11 pm

Re: Name of new document when opening template

Post by tropemil »

Thanks robleyd!!!

RoryOf, The application works with 19 different templates, at least it would be an explanatory name of the content of the document, from which template comes the odt.
OpenOffice 4.0 on Ubuntu and Windows / LibreOffice 5.1 on Ubuntu and Windows
User avatar
RoryOF
Moderator
Posts: 34618
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Name of new document when opening template

Post by RoryOF »

In a file /File /Properties : General tab shows the Template on which the document is based; Alternately, put a line in the template to say "This document is for ...."
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Name of new document when opening template

Post by Villeroy »

This could be worth an enhancement request. There is a "Title" property in the file properties. The window title should use this to create new documents with window tiltes "Letter 1", "Letter 2", "Letter 3" etc. instead of "Untitled 1", "Untitled 2", "Untitled 3" etc. If I recall correctly, MS Office does it like that and it is a good thing to do so.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
User avatar
RoryOF
Moderator
Posts: 34618
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Name of new document when opening template

Post by RoryOF »

The inserted field Title in a document is based on the entry in /File /Properties : Title. I have not experimented to see whether, if you filled this in in the Template, it carries over into the document(s) based on that template. If it does, you will need to insert the Field "Title" into the text of your template so that it echoes to the document.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
tropemil
Posts: 9
Joined: Sat Jul 01, 2017 9:11 pm

Re: Name of new document when opening template

Post by tropemil »

RoryOf, I am only interested in the title of the new document. The user will identify it when he sees it, but if he wants to save it, one day he will call it "a" and another day he will call it "b". Thank you for your contribution.
OpenOffice 4.0 on Ubuntu and Windows / LibreOffice 5.1 on Ubuntu and Windows
tropemil
Posts: 9
Joined: Sat Jul 01, 2017 9:11 pm

Re: Name of new document when opening template

Post by tropemil »

Villeroy wrote:This could be worth an enhancement request. There is a "Title" property in the file properties. The window title should use this to create new documents with window tiltes "Letter 1", "Letter 2", "Letter 3" etc. instead of "Untitled 1", "Untitled 2", "Untitled 3" etc. If I recall correctly, MS Office does it like that and it is a good thing to do so.
That is it. Thanks Villeroy.

It would be nice if that property were accessible in macros. So you could create the name <template name> _ <date> _ <time> and assign it to the new document by an event-->macro.
OpenOffice 4.0 on Ubuntu and Windows / LibreOffice 5.1 on Ubuntu and Windows
User avatar
RoryOF
Moderator
Posts: 34618
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Name of new document when opening template

Post by RoryOF »

tropemil wrote: It would be nice if that property were accessible in macros. So you could create the name <template name> _ <date> _ <time> and assign it to the new document by an event-->macro.
Andrew Pitonyak lists many file macros and has discussion of filehandling in chapter 8, 12.4 and Chapter 13 of his work "OpenOffice.org Macros Explained" at
http://www.pitonyak.org/oo.php
 Edit: If I am not misunderstanding, this is substantially the same problem as using a template to open a blank invoice and numbering each invoice sequentially. This has often been discussed on Forum and suggestions of methods have been made. 
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
tropemil
Posts: 9
Joined: Sat Jul 01, 2017 9:11 pm

Re: Name of new document when opening template

Post by tropemil »

Sorry RoryOff, what I'm looking for is just renaming the document when a template is opened.
When this happens the new document is called "Untitled".
What I look for is the way of changing that "Untittled" by another text.
OpenOffice 4.0 on Ubuntu and Windows / LibreOffice 5.1 on Ubuntu and Windows
User avatar
Zizi64
Volunteer
Posts: 11362
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: Name of new document when opening template

Post by Zizi64 »

Sorry RoryOff, what I'm looking for is just renaming the document when a template is opened.
When this happens the new document is called "Untitled".
What I look for is the way of changing that "Untittled" by another text.
The "Untitled " property, state and name is a basic property of the templates. The templates will loose the connection with the stored template (ots, ott, ...) files when you open it. This is a main difference between the document files ant the template files.
In other words, the opening a template means: the application will create a NEW document based on the stored template file, that have not URL, and have not a specific filename.

This "virtual document" exists in the memory of the computer only until you will save it. YOU need to save it somewhere, and with some filename. You can to do the save procedure manually, or by a macro code.
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Name of new document when opening template

Post by Villeroy »

In other words, the opening a template means: the application will create a NEW document based on the stored template file, that have not URL, and have not a specific filename.
Yes, sure. However, as long as the file is unsaved the window title above the menue could indicate the template from where the new file has been generated from. Simply "New Letter 1" instead of "Untitled 1".
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Post Reply