| View previous topic :: View next topic |
| Author |
Message |
beerdog Newbie

Joined: 02 Sep 2004 Posts: 2 Location: Norway
|
Posted: Thu Sep 02, 2004 12:46 am Post subject: Popup when read only |
|
|
Is there a way to get an popup when a file is read only. Now it just stand in the top of the document, and many of the people that use it here, dont take a notice at it.
I want it like office, that you get a popup. _________________ Sincerily
Beer Dog |
|
| Back to top |
|
 |
uros Super User


Joined: 22 May 2003 Posts: 601 Location: Slovenia
|
Posted: Thu Sep 02, 2004 4:46 am Post subject: |
|
|
Hi beerdog!
There is a solution you asked for. Copy this macro in a Standard library and assign it to Open document event (Tools > Configurations > Events > Open Document). Check option button at "OpenOffice.org" on the right side of dialog first (not "Document")!
| Code: | Sub IsFileReadOnly
oDesktop = createUnoService("com.sun.star.frame.Desktop")
oDocument = oDesktop.getCurrentComponent()
If oDocument.IsReadOnly(oDocument.getURL) Then MsgBox "Document is read only !!!", 16
End Sub
|
It works with OOo 1.1.1b on Win XP pro.
Hope it helps.
Uros |
|
| Back to top |
|
 |
|