Manage Learn to apply best practices and optimize your operations.

Email Database Acl To Yourself

For those with anything less than manager access to a database, and that
database Access Control List is too large (and thus won't scroll down for such
this code may be useful.

Just change the server and database file name in the first line of code to the
server & database you want to grab the ACL info from.
Dim db As New NotesDatabase( "NOTES-APPS-KC01P", "accserv\ascal.nsf" )
Dim acl As NotesACL,session As New notessession
Dim entry As NotesACLEntry,myLevel As String,t1 As Integer,myFile As String
Set acl = db.ACL
myFile = "C:\myACL.txt"
Open myFile For Output As #1
Set entry = acl.GetFirstEntry
Do Until entry Is Nothing
t1 = entry.level
If t1=6 Then myLevel = "Manager"
If t1=5 Then myLevel="Designer"
If t1=4 Then myLevel="Editor"
If t1=3 Then myLevel = "Author"
If t1=2 Then myLevel = "Reader"
If t1=1 Then myLevel = "Depositor"
If t1=0 Then myLevel = "No Access"
Print #1,;Tab(50);myLevel
Forall y In entry.roles
If y = "" Then
Print #1," . . . role: " & y
End If
End Forall
Set entry = acl.GetNextEntry(entry)
Print #1," "
Print #1," "
Close #1
Print "File written to " & myFile

REM Compose the Email document and attach the file, save & send
Set doc = New NotesDocument( db )
Set rtitem = New NotesRichTextItem( doc, "Body" )
Dim recipients( 1 To 3 ) As String
recipients(1) = session.CommonUserName
MessageSubject = "ACL List"
MessageBody = "Here is the file attachment for an ACL you queried. Right
click the file and then click "+Chr$(34)+ "Launch" + Chr$(34) + " to view."
doc.Body = MessageBody
Set object = rtitem.EmbedObject (EMBED_ATTACHMENT,"",myFile,"Attachment1")
doc.Form = "Main Topic"
doc.Subject = MessageSubject
Call doc.Send( True, recipients )
Call doc.Save(True,True)
Print "message sent!"
Messagebox "Email Sent!",0,"Email Sent!"
REM Now Delete the temp file
Kill MyFile
Print "Temp file: " +MyFile + " has been deleted."

Dig Deeper on Domino Resources - Part 4

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.




  • iSeries tutorials's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...