Sub Click(Source As Button)
Dim session As New NotesSession
Dim db As NotesDatabase
Dim acl As NotesACL
Dim entry As NotesACLEntry
Set db = session.CurrentDatabase
Set acl = db.ACL
Set entry = acl.GetEntry( "name/CERT" )
If Cstr(entry.Level)="0" Then
Msgbox "不能存取者"
End If
If Cstr(entry.Level)="1" Then
Msgbox "存放者"
End If
If Cstr(entry.Level)="2" Then
Msgbox "读者"
End If
If Cstr(entry.Level)="3" Then
Msgbox "作者"
End If
If Cstr(entry.Level)="4" Then
Msgbox "编辑者"
End If
If Cstr(entry.Level)="5" Then
Msgbox "设计者"
End If
If Cstr(entry.Level)="6" Then
Msgbox "管理者"
End If
在表单的querymodechange事件里加入一下代码。
Sub Querymodechange(Source As Notesuidocument, Continue As Variant)
If Not ( IsAllowEdit ) Then
Messagebox( "对不起,你不能编辑这篇文档. ")
continue = False
End If
End Sub