LOTUSSCRIPT/COM/OLE CLASSES
Sub Initialize Dim db As New NotesDatabase( "", "ocean.nsf" ) Dim view As NotesView Dim column As NotesViewColumn Dim doc As NotesDocument Dim done As Variant Set view = db.GetView( "By Category" ) ' get the first sorted and categorized column in the view Forall c In view.Columns If ( c.IsSorted And c.IsCategory ) Then Set column = c Exit Forall End If End Forall ' get the first document that matches the key Set doc = view.GetDocumentByKey( "Blowfish" ) ' get the remaining documents that match the key ' since ColumnValues array starts at 0 for position 1, ' subtract 1 from the column position While ( doc.ColumnValues( column.Position - 1 ) _ = "Blowfish" ) Call doc.PutInFolder( "Fishy" ) Set doc = view.GetNextDocument( doc ) Wend End Sub