A Simple Way To Search For Documents And Place Them Into A Folder

The NotesDocumentCollection method, PutAllInFolder, allows you to place a
collection of documents into a folder with one statement. You get a collection
when you do a Full Text Search. The example below performs a full text search
for the LastName 'Smith'. The members of the resulting NotesDocumentCollection
are then put into a folder named Managers.
Dim session As New NotesSession
Dim db As NotesDatabase
Dim collection As NotesDocumentCollection
Dim UpIndex as Integer
Set db = session.CurrentDatabase
'If the database is on a server and is not indexed, ask user if it should be
created
If db.Server <> "" Then
If Not db.IsFTIndexed Then
UpIndex = Messagebox("This database is on a server and must be full
text indexed for the example to work. Create the index?",51,"Create Index?")
If UpIndex = 6 Then
Call db.UpdateFTIndex(True)

'-------------- Use the database method UpdateFTIndex to update the index, or
create one if none exists
Else
'-------------- If the user says no
Msgbox "This example will not work properly from a server until
a full text index is created." 'Tell the user why the program is ending
End
End If
End If
End If
Set collection = db.FTSearch("""Smith""", 0)
' ------------- Search for any documents containing the word
NotesDocumentCollection
Collection.PutAllInFolder("Managers")
' -------------- You can ask users for the name of a folder, and if it does not
exist it is created!

Dig Deeper on Lotus Notes Domino Administration Tools

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchWindowsServer

Search400

  • iSeries tutorials

    Search400.com's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...

SearchDataCenter

SearchContentManagement

Close