Setting the file name of an new, unnamed document?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Setting the file name of an new, unnamed document?

Felix E. Klee
How do I set the filename (URL) of a newly created, unnamed document?

I know that one can set the title using

   DocumentInfo.Title

but I could find no property for the filename in the service
DocumentInfo.  Also, looking through the reference documentation, I
didn't find anything appropriate.

--
Felix E. Klee

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Setting the file name of an new, unnamed document?

Felix E. Klee
Uh, I forgot to mention a couple of things:

1. We're employing OO 1.1.3, soon perhaps OO 1.1.4.

2. I do not want to store the document to disk automatically.  This
   should only be done manually by the user.

3. The issue is only about text documents (OO Writer).

--
Felix E. Klee

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Setting the file name of an new, unnamed document?

Andrew Pitonyak
In reply to this post by Felix E. Klee
Felix E. Klee wrote:

> How do I set the filename (URL) of a newly created, unnamed document?
>
> I know that one can set the title using
>
>   DocumentInfo.Title
>
> but I could find no property for the filename in the service
> DocumentInfo.  Also, looking through the reference documentation, I
> didn't find anything appropriate.
>
The filename is not set until the document is stored on disk. In other
words, you can not give it a file name until you save it to disk. The
property is read only. use StoreAsURL(...) to do this.

--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
My Book: http://www.hentzenwerke.com/catalog/oome.htm
Info:  http://www.pitonyak.org/oo.php
See Also: http://documentation.openoffice.org/HOW_TO/index.html


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Re: Setting the file name of an new, unnamed document?

Andrew Pitonyak
In reply to this post by Felix E. Klee
Felix E. Klee wrote:

> Uh, I forgot to mention a couple of things:
>
> 1. We're employing OO 1.1.3, soon perhaps OO 1.1.4.

I recommend the latest version

>
> 2. I do not want to store the document to disk automatically.  This
>   should only be done manually by the user.

then you can not give it the file name.

> 3. The issue is only about text documents (OO Writer).


--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
My Book: http://www.hentzenwerke.com/catalog/oome.htm
Info:  http://www.pitonyak.org/oo.php
See Also: http://documentation.openoffice.org/HOW_TO/index.html


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]