ACL LOTUS导出

时间:2017-04-19 08:55:08

标签: lotus-notes lotus-domino lotus

如何仅在此脚本中获取用户类型未指定?我不能像入门一样。 IsPerson?可能有一些想法?我找不到任何其他东西。

我目前的代码如下:

Dim session As New NotesSession 
    Dim xlFilename As String
    Dim Excel As Variant
    Dim xlWorkbook As Variant
    Dim xlSheet As Variant
    Dim object As NotesEmbeddedObject 
    Dim i As Integer
    i=1
    'The ACL info gets exported to c:\acllist.xls. You can change the path and filename.
    xlFilename = "C:\acllist.xls"
    Set Excel = CreateObject( "Excel.Application" ) 
    Excel.Visible = True                      
    Excel.Workbooks.Open xlFilename 
    Set xlWorkbook = Excel.ActiveWorkbook 
    Set xlSheet = xlWorkbook.ActiveSheet 
    Dim cellval As String

    'Key in the server name in the below line.
    Dim dbdir As New NotesDbDirectory("xxxxxx/yyy") 

    Dim db As NotesDatabase 
    Set db = dbdir.GetFirstDatabase(DATABASE) 
    While Not db Is Nothing


      Dim acl As NotesACL 
      Dim entrylevel 
      Call db.open("","") 
      Set acl = db.ACL 

      Dim entry As NotesACLEntry 
      Set entry = acl.Getfirstentry() 

      While Not entry Is Nothing

        If entry.IsPerson Or entry.isgroup Then

          If (entry.level=ACLLEVEL_NOACCESS) Then
            entrylevel="No Access"
          ElseIf (entry.level=ACLLEVEL_DEPOSITOR) Then
            entrylevel="Depositor"
          ElseIf (entry.level=ACLLEVEL_READER) Then
            entrylevel="Reader"
          ElseIf (entry.level=ACLLEVEL_AUTHOR) Then
            entrylevel="Author"
          ElseIf (entry.level=ACLLEVEL_EDITOR) Then
            entrylevel="Editor"
          ElseIf (entry.level=ACLLEVEL_DESIGNER) Then
            entrylevel="Designer"
          ElseIf (entry.level=ACLLEVEL_MANAGER) Then
            entrylevel="Manager"
          End If

          xlsheet.Cells(i,1).value=db.Title 
          xlsheet.Cells(i,2).value=db.FilePath
          xlsheet.Cells(i,3).value=entry.name
          xlsheet.Cells(i,4).value=entrylevel 

          i=i+1         

        End If

        Set entry=acl.Getnextentry(entry) 

      Wend
      Set db=dbdir.Getnextdatabase 
    Wend

0 个答案:

没有答案