LOTUSSCRIPT /COM/OLE のクラス
例:検索によって文書を収集する
1. 次の例では、全文索引がない場合は全文索引を作成し、「alpha」という単語か「beta」という文字列を含むすべての文書を検索します。
Sub Initialize
Dim session As New NotesSession
Dim db As NotesDatabase
Dim collection As NotesDocumentCollection
Dim doc As NotesDocument
Set db = session.CurrentDatabase
If NOT db.IsFTIndexed Then
Call db.UpdateFTIndex(True)
End If
Set collection = db.FTSearch("alpha OR beta",0)
Set doc = collection.GetFirstDocument()
While Not(doc Is Nothing)
Messagebox doc.Subject(0)
Set doc = collection.GetNextDocument(doc)
Wend
End Sub
2. 次の例では Lotus Notes の式言語の @Contains を使用して [Subject] フィールドに文字列「Valdez」を含むすべての文書を検索します。
Sub Initialize
Dim session As New NotesSession
Dim dt As New NotesDateTime("07/15/97")
Dim db As NotesDatabase
Dim dc As NotesDocumentCollection
Dim doc As NotesDocument
Set db = session.CurrentDatabase
Set dc = db.Search("@Contains(Subject;""Valdez"")", dt, 0)
Set doc = dc.GetFirstDocument()
While Not(doc Is Nothing)
Messagebox doc.Subject(0)
Set doc = dc.GetNextDocument(doc)
Wend
End Sub
関連項目
LotusScript のクラスで検索によって文書を収集する
用語集
フィードバック
ヘルプ
または
プロダクトユーザビリティ
ヘルプの使い方
すべてのヘルプ項目
用語集