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

Joined: 02 Sep 2004 Posts: 2 Location: Norway
|
Posted: Thu Sep 02, 2004 12:47 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 |
|
 |
Liliana_mcm General User


Joined: 19 May 2004 Posts: 32 Location: Marinha Grande - Portugal
|
Posted: Thu Sep 02, 2004 3:11 am Post subject: |
|
|
Hi ,
My idea to solve this problem is program a macro that runs every time that a user open the document. In this macro you have to first verify the properties of the document, if it's readonly. If readonly propertie value is true then send a msgbox to user. Because the msgbox get the focus instead of the document, the user have to see and click on buton (if there exist a button ok) to continue.
I have un macro that open every documents with the propertie readonly to true, and if not find the document sends an msgbox to the user, i just think that could help.
| Code: |
Sub AbrirDoc( Url As String, Optional pass as string)
Dim pvFileProps(1) As New com.sun.star.beans.PropertyValue
Dim oDesktop As Object
pvFileProps(0).Name = "ReadOnly"
pvFileProps(0).Value = True
if Not IsMissing(pass) then
pvFileProps(1).Name = "Password"
pvFileProps(1).Value = pass
end if
oDesktop = createUnoService("com.sun.star.frame.Desktop")
oDocument = oDesktop.LoadComponentFromURL(Url,"_blank", 0 ,pvFileProps())
if IsNull(oDocument) then
MsgBox("Não encontrei o ficheiro.", 0+16, "Erro")
Exit Sub
End If
End Sub
|
For more information, check the url:
http://www.pitonyak.org/AndrewMacro.pdf[
I hope this help you,
Liliana Matos. |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|