- 次のスクリプトは、ビューナビゲータの最後の文書のユニバーサル ID を表示します。
Dim session As New NotesSession
Dim db As NotesDatabase
Dim view As NotesView
Dim entry As NotesViewEntry
Dim nav As NotesViewNavigator
Set db = session.CurrentDatabase
Set view = db.GetView("By Category")
view.AutoUpdate = False
Set nav = view.CreateViewNav
Set entry = nav.GetLastDocument
Messagebox "UNID: " & entry.UniversalID
- 次のスクリプトは、ビューナビゲータの最後のエントリの 1 つ前のエントリを返し、関連する文書をフォルダに入れます。
Dim session As New NotesSession
Dim db As NotesDatabase
Dim view As NotesView
Dim entryA As NotesViewEntry
Dim entryB As NotesViewEntry
Dim nav As NotesViewNavigator
Dim doc As NotesDocument
Set db = session.CurrentDatabase
Set view = db.GetView("By Category")
view.AutoUpdate = False
Set nav = view.CreateViewNav
Set entryA = nav.GetLastDocument
Set entryB = nav.GetPrevDocument(entryA)
Set doc = entryB.Document
Call doc.PutInFolder("My Favorites")
- 次のスクリプトは、ビューナビゲータでユーザーが指定したエントリのユニバーサル ID を表示します。
Dim session As New NotesSession
Dim db As NotesDatabase
Dim view As NotesView
Dim entry As NotesViewEntry
Dim nav As NotesViewNavigator
Dim doc As NotesDocument
Set db = session.CurrentDatabase
Set view = db.GetView("By Category")
view.AutoUpdate = False
Set nav = view.CreateViewNav
Set entry = nav.GetPos(Inputbox$("Entry position: "), ".")
Messagebox "Entry UNID: " & entry.UniversalID