LOTUSSCRIPT /COM/OLE のクラス
例:ID によって文書を検索する
次の例では、データベースの各文書の note ID を文字列の配列に保存し、この配列を GetDocumentByID メソッドのループに使って各文書にアクセスします。UniversalID プロパティと GetDocumentByUNID メソッドに置き換えると、ユニバーサル ID を使って文書を検索できます。
Sub Initialize
Dim session As New NotesSession
Dim db As NotesDatabase
Dim noteIDs()
Dim collection As NotesDocumentCollection
Dim doc As NotesDocument
Set db = session.CurrentDatabase
Set collection = db.AllDocuments
Redim noteIDs(1 To collection.Count)
Set doc = collection.GetFirstDocument()
Messagebox "count = " & collection.Count
If collection.Count > 0 Then
For j = 1 To collection.Count
noteIDs(j) = doc.noteID
Set doc = collection.GetNextDocument(doc)
Next
Forall noteID In noteIDs
Set doc = db.GetDocumentByID(noteID)
Messagebox doc.Subject(0)
End Forall
End If
End Sub
関連項目
LotusScript のクラスで ID によって文書を検索する
用語集
ヘルプに対するフィードバック
ヘルプの使い方
ヘルプを開く
用語集
ヘルプに対するフィードバック
ヘルプの使い方
ヘルプを開く