LotusScript_文档查询循环方法整理

1.  视图(View)查询

...
Set view = db.GetView("ViewName")
Set doc = view.GetFirstDocument
While Not doc Is Nothing
    ...
Set doc = view.GetNextDocument(doc)
Wend

2. NotesDocumentCollection 查询

1、文档处理

...
Dim dc As NotesDocumentCollection
Set dc=db.UnprocessedDocuments
For i=1 To dc.Count
    Set doc=dc.GetNthDocument(i)
    ...
Next

2、数据库文档查询

...
QueryStr = |form="FormName" & deleteflag!="1" & @IsUnavailable($Conflict)|
Set dc = db.search(QueryStr , DateTime , 0)
For i=1 To dc.Count
    Set doc_tmp=dc.GetNthDocument(i)
        ...
Next

 

posted @ 2013-12-25 11:03  殄恪  阅读(445)  评论(0编辑  收藏  举报