用代理啊,首先搜索到数据库中的所有文档,然后逐一删除!
具体代码帮助中有很多相近的,找到后直接考过来稍加修改就能用!
Dim session As New NotesSession
Dim db As NotesDatabase
Dim collection As NotesDocumentCollection
Dim doc As NotesDocument
Set db = session.CurrentDatabase
Set collection = db.AllDocuments
Set doc = collection.GetFirstDocument()
While Not(doc Is Nothing)
Call doc.Remove( True )
Set doc = collection.GetNextDocument(doc)
Wend
Set doc = collection.GetFirstDocument()
While Not(doc Is Nothing)
Call doc.Remove( True )
Set doc = collection.GetNextDocument(doc)
Wend
上面代码直接,换成
Call collection.removeAll(True)