Set outline = db.GetOutline(contDoc.GetItemValue("OutlineName")(0))
If outline Is Nothing Then
HTML = "<P>OutLine " & contDoc.GetItemValue("OutlineName")(0) & " не найден</P>"
Else
Set entry = outline.GetFirst()
Do Until entry Is Nothing
Call processEntry(outline, entry, True, HTML)
Set entry = outline.getnextsibling(entry)
Loop
End If
Function processEntry(AOutline As NotesOutline, AEntry As NotesOutlineEntry, AIsParent As Boolean, AHtml As String) As Boolean
Dim resHtml As String
Dim childEntry As NotesOutlineEntry
If AEntry.Label = "" Then
resHtml = resHtml & "<BR>"
End If
If AIsParent Then
resHtml = resHtml & {<DIV class="OutlineParent" }
Else
resHtml = resHtml & {<DIV class="OutlineChild" }
End If
If AEntry.HasChildren Then
resHtml = resHtml & { onClick="myFunc();" haschildren="1">} & AEntry.Label & "</DIV>" & Chr(10)
resHtml = resHtml & { <DIV style="display:none">}
Set childEntry = AOutline.getchild(AEntry)
Do Until childEntry Is Nothing
Call processEntry(AOutline, childEntry, False, resHtml)
Set childEntry = AOutline.getnextsibling(childEntry)
Loop
resHtml = resHtml & { </DIV>}
Else
resHtml = resHtml & ">" & getEntryLink(AEntry) & "</DIV>" & Chr(10)
End If
AHtml = AHtml & resHtml
End Function
Function getEntryLink(entry As notesoutlineEntry) As String
If entry.Type = OUTLINE_TYPE_NAMEDELEMENT Then
Select Case entry.EntryClass
Case OUTLINE_CLASS_FOLDER:
linkHTML = linkHTML & entry.NamedElement & "?OpenView"
Case OUTLINE_CLASS_FORM:
linkHTML = linkHTML & entry.NamedElement & "?OpenForm"
Case OUTLINE_CLASS_VIEW:
linkHTML = linkHTML & entry.NamedElement & "?OpenView"
Case OUTLINE_CLASS_FORM:
linkHTML = linkHTML & entry.NamedElement & "?OpenForm"
Case OUTLINE_CLASS_PAGE:
linkHTML = linkHTML & entry.NamedElement & "?OpenPage"
End Select
Elseif entry.Type = OUTLINE_TYPE_ACTION Then
linkHTML = linkHTML & "#"
End if
End Function