Dim session As New NotesSession
Dim db As NotesDatabase
Dim acl As NotesACL
Set db = session.CurrentDatabase
Set acl = db.ACL
Call acl.AddRole( "HR Contact" )
Call acl.Save
次のスクリプトで Messagebox 関数に関連する定数を使用するには、ファイル LSCONST.LSS をインクルードする必要があります。
Dim session As New NotesSession
Dim db As NotesDatabase
Dim acl As NotesACL
Dim entry As NotesACLEntry
Dim newName As String
Dim confirm As Integer
Set db = session.CurrentDatabase
Set acl = db.ACL
newName = Inputbox$ _
( "Who do you want to add?", "Name" )
Set entry = New NotesACLEntry _
( acl, newName, ACLLEVEL_AUTHOR )
confirm = Messagebox _
( "Are you sure?", MB_YESNO, "Confirm" )
If ( confirm = IDYES ) Then
Call acl.Save
End If