OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

Popup when read only

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> Setup and Troubleshooting
View previous topic :: View next topic  
Author Message
beerdog
Newbie
Newbie


Joined: 02 Sep 2004
Posts: 2
Location: Norway

PostPosted: Thu Sep 02, 2004 12:47 am    Post subject: Popup when read only Reply with quote

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
View user's profile Send private message Visit poster's website
Liliana_mcm
General User
General User


Joined: 19 May 2004
Posts: 32
Location: Marinha Grande - Portugal

PostPosted: Thu Sep 02, 2004 3:11 am    Post subject: Reply with quote

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, Rolling Eyes
Liliana Matos.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> Setup and Troubleshooting All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
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