本帖最后由 kuyouqing 于 2010-04-30 09:54:26 编辑

解决方案 »

  1.   

    Sub Initialize
    Dim s As New NotesSession  
    Dim db As NotesDatabase
    Dim ndb As NotesDatabase
    Set db=s.CurrentDatabase
    Dim UserMailDb As NotesDatabase 
    Dim dc As NotesDocumentCollection
    Set UserMailDb=db
    If UserMailDb.IsOpen Then
    Set dc=UserMailDb.Search("(@Date(@Today)-@Date(@Created) )/(60*60*24)>100",Nothing,0)
    '删除100天以前的文档
    If dc.count>0 Then   
    Call dc.RemoveAll(True)
    End If
    End IfEnd Sub
    这样可以实现在这个功能吗?