Dim session As New NotesSession
Dim db As NotesDatabase
Dim view As NotesView
Dim vc As NotesViewEntryCollection
Dim entry As NotesViewEntry
Dim doc As notesdocument
Set db = session.CurrentDatabase
Set view = db.GetView("($All)")
Set vc = view.AllEntries
Set entry= vc.getfirstentry
While Not entry Is Nothing
Set doc=entry.document
Msgbox doc.aaa(0)
Set entry=vc.getnextentry(entry)
Wend
这样的话,只能够通过key 来从view 中取啊,如果不满足key ,那么肯定就取不出来
和楼主的意思不一致啊,
为什么不使用
set doc =view.getfirstdocument()
while not doc is Nothing
你的代码 …………
set doc =view.getnextdocument(doc)
Dim session As New NotesSession
Dim db As NotesDatabase
Dim view As NotesView
Dim vc As NotesViewEntryCollection
Set db = session.CurrentDatabase
Set view = db.GetView("view")
Set vc = view.AllEntries