通过url调用Lotusscript代理,循环遍历某视图异常

通过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
参与6

提问者

eiffelly
软件开发工程师XO

相关问题

相关资料

问题状态

  • 发布时间:2014-12-09
  • 关注会员:1 人
  • 问题浏览:4056
  • 最近回答:2014-12-10
  • X社区推广