LOTUSSCRIPT/COM/OLE CLASSES
Examples: PutInFolder method
1. This script puts a document in the folder Jambalaya.
Dim doc As NotesDocument
'...set value of doc...
Call doc.PutInFolder( "Jambalaya" )
2. This script puts a document in the folder Spicy, which is located inside the folder Recipes.
Dim doc As NotesDocument
'...set value of doc...
Call doc.PutInFolder( "Recipes\Spicy" )
3. This script puts a document in the private folder called Greens.
Dim doc As NotesDocument
'...set value of doc...
Call doc.PutInFolder( "Greens" )
4. This script performs a full-text search in the current database and places the top twenty matching documents in a folder called Spicy. If the folder does not exist, one will be created.
Dim session As New NotesSession
Dim db As NotesDatabase
Dim dc As NotesDocumentCollection
Dim doc As NotesDocument
Set db = session.CurrentDatabase
Set dc = db.FTSearch("cayenne",20)
Set doc = dc.GetFirstDocument
While Not(doc Is Nothing)
Call doc.PutInFolder("Spicy",True)
Set doc = dc.GetNextDocument(doc)
Wend
5. This script selects all the documents within a document collection that contain the field "Conflict", and moves them to a folder.
Dim s As New NotesSession
Dim db As NotesDatabase
Dim dc As NotesDocumentCollection
Dim doc As NotesDocument
Set db = s.CurrentDatabase
Set dc = db.AllDocuments
Set doc = dc.GetFirstDocument
While Not(doc Is Nothing)
If doc.IsResponse Then
If doc.HasItem("$Conflict") Then
Call doc.PutInFolder("Conflicts")
End If
End If
Set doc = dc.GetNextDocument(doc)
Wend
See Also
PutInFolder method
Glossary
Feedback on
Help
or
Product Usability
?
Help on Help
All Help Contents
Glossary