LOTUSSCRIPT /COM/OLE のクラス


例:EnableFolder メソッド
次のコードは、「cayenne」という単語を含むコレクション内のすべての文書を「Spicy」フォルダに移動します。EnableFolder メソッドを呼び出すと「Spicy」フォルダが存在することを確認します。フォルダが存在しない場合、メソッドがフォルダを作成します。

Sub Initialize
 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
 Call db.EnableFolder("Spicy")
 While Not(doc Is Nothing)
   Call doc.PutInFolder("Spicy", False)
   Set doc = dc.GetNextDocument(doc)
 Wend
End Sub

関連項目