通过url调用Lotusscript代理,循环遍历某视图文档,文档获取数目不对,时而获取到1条数据,时而2条数据,有时候没有获取到数据,但视图中始终是存在数据,请大侠们指教。代码如下:
Dim session As New NotesSession
Dim notedb As NotesDatabase
Dim noteview As NotesView
Dim notevc As NotesViewEntryCollection
Dim notee As NotesViewEntry
Dim notedoc As NotesDocument
Set notedb = session.Currentdatabase
Set noteview = notedb.Getview("WtmVw")
Set notevc = noteview.Allentries
MsgBox CStr(notevc.Count) + "代理开始执行..."
If notevc.Count > 0 Then
Dim i As Integer
For i = 1 To notevc.Count
Set notee = notevc.GetNthEntry(i)
Set notedoc =notee.Document
notedoc.subject= "new value"
Call notedoc.save(True,False)
next
End If
Exit Sub
收起