Dim workspace As New NotesUIWorkspace Dim session As New NotesSession Dim uidoc As NotesUIDocument Dim acl As NotesACL Dim entry As NotesACLEntry Set db = session.CurrentDatabase Set acl = db.ACL Set entry = acl.GetEntry( session.CommonUserName ) If entry Is Nothing Then Set entry = acl.GetEntry( session.UserName ) End If If entry Is Nothing Then Messagebox _ "No entry for " & session.CommonUserName & _ " or " & session.UserName,, "No entry" Exit Sub End If If entry.IsRoleEnabled( "[Supervisor]" ) Then Set uidoc = workspace.ComposeDocument( "", "approval" ) Else Set uidoc = workspace.ComposeDocument( "", "request" ) End If
See Also