Dim query As String Dim folderName As String Dim session As New NotesSession Dim db As NotesDatabase Dim view As NotesView Dim collection As NotesDocumentCollection Dim doc As NotesDocument query = Inputbox$( "What string do you want to search for?" ) folderName = Inputbox$ _ ( "Which folder do you want the documents in?" ) Set db = session.CurrentDatabase Set view = db.GetView( folderName ) If ( view Is Nothing ) Then Messagebox _ ( folderName & " does not exist in this database." ) Elseif Not ( view.IsFolder ) Then Messagebox( folderName & _ " is a view, not a folder. Please enter a folder." ) Else Set collection = db.FTSearch( query, 0 ) Set doc = collection.GetFirstDocument While Not ( doc Is Nothing ) Call doc.PutInFolder( folderName ) Set doc = collection.GetNextDocument( doc ) Wend End If
See Also