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 这样可以实现在这个功能吗?
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
这样可以实现在这个功能吗?