Allow deleting doumments and add a role "DeleteDocs".
Sub Querydocumentdelete(Source As Notesuidatabase, Continue As Variant)
Dim nv As Variant
nv = Evaluate("@implode(@userroles)")
If Instr(nv(0), "[DeleteDocs]")>0 Then
Print "User has Delete Docs role, so deleting is ok"
continue=True
Else
Messagebox "You can't delete, please cancel the request." & _
"You can only delete if you have the [DeleteDocs] role."
continue=False
End If
End Sub