LOTUSSCRIPT /COM/OLE のクラス
例:ビューナビゲータからエントリにアクセスする
1. 次の例では、ビューナビゲータの指定されたエントリを返し、そのエントリに関連付けられた文書を Over Stock というフォルダに入れます。
Sub Initialize
Dim session As New NotesSession
Dim db As NotesDatabase
Dim view As NotesView
Dim nav As NotesViewNavigator
Dim entryA As NotesViewEntry
Dim entryB As NotesViewEntry
Dim doc As NotesDocument
Set db = session.CurrentDatabase
Set view = db.GetView("By Category")
Set nav = view.CreateViewNavFromCategory("Stock")
Set entryA = nav.GetFirst
Set entryB = nav.GetEntry(entryA)
Set doc = entryB.Document
Call doc.PutInFolder("Over Stock")
End Sub
2. 次の例では、Notes ビューナビゲータの先頭文書を返し、そのユニバーサル ID を表示します。
Sub Intialize
Dim session As New NotesSession
Dim db As NotesDatabase
Dim view As NotesView
Dim nav As NotesViewNavigator
Dim entry As NotesViewEntry
Set db = session.CurrentDatabase
Set view = db.GetView("By Category")
Set nav = view.CreateViewNav
Set entry = nav.GetFirstDocument
Messagebox "Universal ID:" & entry.UniversalID
End Sub
3. 次の例では、指定されたエントリの前のエントリを返し、そのエントリの子の数を表示します。
Sub Intialize
Dim session As New NotesSession
Dim db As NotesDatabase
Dim view As NotesView
Dim nav As NotesViewNavigator
Dim entryA As NotesViewEntry
Dim entryB As NotesViewEntry
Set db = session.CurrentDatabase
Set view = db.GetView("By Category")
Set nav = view.CreateViewNav
Set entryA = nav.GetLast
Set entryB = nav.GetPrev(entryA)
Messagebox entryB.ChildCount
End Sub
関連項目
ビューナビゲータのエントリにアクセスする
用語集
フィードバック
ヘルプ
または
プロダクトユーザビリティ
ヘルプの使い方
すべてのヘルプ項目
用語集