Dim s As New notesSession
Dim db As notesdatabase
Dim view As notesView
Dim doc As notesDocument
Dim userName As Variant
userName =Evaluate("@Name([CN];@UserName)")
Dim counter As Integer
Set db=s.CurrentDatabase
Set view=db.GetView("stuffview")
Dim dc As NotesDocumentCollection
Msgbox "sssssssss "+userName(0)
Set dc = view.GetAllDocumentsByKey(userName(0))
Set dc = view.GetAllDocumentsByKey(userName(0))
我要把这个作为循环的结束
------解决方案--------------------
看看这个例子
This agent displays the values of all the columns for a view entry.
Sub Initialize
Dim session As New NotesSession
Dim db As New NotesDatabase("","test.nsf")
Dim view As NotesView
Dim entry As NotesViewEntry
Set db = session.CurrentDatabase
Set view = db.GetView("All")
Set entry = view.GetEntryByKey("Sports car", False)
Forall colval In entry.ColumnValues
col% = col% + 1
Messagebox colval,, "Column " & col%
End Forall
End Sub