List Info

Thread: Getting the document name displayed in the title bar of the window




Getting the document name displayed in the title bar of the window
user name
2007-11-05 01:44:52
Hi,

I wonder how I can get the "name" of my document
with OOo Basic.

The "name" is what one can see in the title bar of
the application 
window. It also is the string OOo would deliver to the
printer 
driver as the name of the document to print. This
"name" does not 
equal the file name, and it does not equal any of the
document 
properties found in the File|Properties... dialoque.

If the document has already been saved the "name"
equals the file 
name without the extension. For example, if the document has
been 
saved as test123.odt, the "name" is: test123

In this case I can extract the "name" from the URL
property of 
thisComponent. Okay so far.

But if the document has not been saved yet, it has a
"name" like 
Untitled1, Untitled2 or Untitled3. How can I get this
"name"?

TIA for any help!

Stefan

------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribeapi.openoffice.org
For additional commands, e-mail: dev-helpapi.openoffice.org


Re: Getting the document name displayed in the title bar of the window
user name
2007-11-05 06:18:38
You're looking for

ThisComponent.CurrentController.Frame.Title

Matthias

------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribeapi.openoffice.org
For additional commands, e-mail: dev-helpapi.openoffice.org


Re: Getting the document name displayed in the title bar of the window
user name
2007-11-05 14:12:35
Matthias B. schrieb:
> You're looking for
> 
> ThisComponent.CurrentController.Frame.Title

This is very helpful. Thank you.

Stefan


------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribeapi.openoffice.org
For additional commands, e-mail: dev-helpapi.openoffice.org


[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )