次の例はコレクションの最初の文書を削除し、残りの文書を「My Favorites」フォルダに入れます。
Sub Click(Source As Button)
Dim session As New NotesSession
Dim db As NotesDatabase
Dim collection As NotesDocumentCollection
Dim doc As NotesDocument
Set db = session.CurrentDatabase
Set collection = db.FTSearch("Business reports", 10)
Set doc = collection.GetFirstDocument
Call collection.DeleteDocument(doc)
Call collection.PutAllinFolder("My Favorites")
End Sub