Attribute VB_Name = "Navigationsansicht" Option Explicit Const OUTPUT_FILE As String = "C:\Windows\Desktop\struktur.html" Sub printNavigationStructure() If ActiveWeb Is Nothing Then MsgBox "Sie müssen zuerst ein Web öffnen.", vbOKOnly Or vbCritical Exit Sub End If Open OUTPUT_FILE For Output As #1 Print #1, "Navigationsstruktur für Web '" & ActiveWeb.Title & "'" Print #1, printChildNodes(ActiveWeb.RootNavigationNode) Print #1, "" Close #1 MsgBox "Fertig!", vbOKOnly Or vbInformation End Sub Function printChildNodes(ByRef node As NavigationNode) As String Dim childNode As NavigationNode If Not node Is ActiveWeb.RootNavigationNode Then printChildNodes = node.Label & "<" & node.URL & ">" End If If node.Children.Count > 0 Then printChildNodes = printChildNodes & "" End If End Function