LOTUSSCRIPT/COM/OLE CLASSES


Examples: EntryClass property
This example gets the second top-level entry in an outline and displays the type of named element it is or returns the message, "Second entry is not a named element."

Sub Initialize
 Dim session As New NotesSession
 Dim db As NotesDatabase
 Dim outline As NotesOutline
 Dim oe As NotesOutlineEntry
 Dim firstOE As NotesOutlineEntry
 Dim secondOE As NotesOutlineEntry
 Dim entryClass As Long
 Set db = session.CurrentDatabase
 Set outline = db.GetOutline("Web site")
 Set firstOE = outline.GetFirst
 If Not (firstOE Is Nothing) Then
   Set secondOE = outline.GetNext(firstOE)
   If Not (secondOE Is Nothing) Then
     While secondOE.Level <> 0
       Set oe = secondOE
       Set secondOE = Outline.GetNext(oe)
     Wend
     If secondOE.Type = OUTLINE_TYPE_NAMEDELEMENT Then
       entryClass = secondOE.EntryClass
       Select Case entryClass
       Case OUTLINE_CLASS_FOLDER: Messagebox "Second _
       entry is a folder"
       Case OUTLINE_CLASS_FORM: Messagebox "Second entry is _
       a form"
       Case OUTLINE_CLASS_FRAMESET: Messagebox "Second entry _
       is a frameset"
       Case OUTLINE_CLASS_NAVIGATOR: Messagebox "Second entry _
       is a navigator"
       Case OUTLINE_CLASS_PAGE: Messagebox "Second entry is a page"
       Case OUTLINE_CLASS_UNKNOWN: Messagebox "Second entry is _
       an unknown design element"
       Case OUTLINE_CLASS_VIEW: Messagebox "Second entry is a view"
       End Select
     Else
       Messagebox "Second entry is not a named element"
     End If
   Else
     Messagebox "There is no second top-level entry"
   End If
 End If
End Sub

See Also