LOTUSSCRIPT /COM/OLE のクラス


例:NamedElement プロパティ
次のコードはアウトライン内のエントリをループして、名前付き要素にリンクしているエントリの要素名 (別名がある場合は、別名) を一度に 1 つずつ表示します。たとえば、次のコードはアウトラインのエントリの 1 つである first というタイトルを持つエントリが、Home という名前のページ要素にリンクするページリソースである場合、「Named element for first is Home」と表示します。

Sub Initialize
 Dim session As New NotesSession
 Dim db As NotesDatabase
 Dim outline As NotesOutline
 Dim oe As NotesOutlineEntry
 Dim element As String
■ Set db = session.CurrentDatabase
■ Set outline = db.GetOutline("Site map")
■ Set oe = outline.GetFirst
 While Not (oe Is Nothing)
   If oe.Type = OUTLINE_TYPE_NAMEDELEMENT Then
     element = oe.NamedElement
     Messagebox "Named element for " & oe.Label _
     & " is " & element,, "Entry type"
   End If
   Set oe = outline.GetNext(oe)
 Wend
End Sub

関連項目