Sub Click(Source As Button) Const ABTFIL$ = "(orderReportKauf2)" Dim ws As New NotesUIWorkspace Dim s As New NotesSession Dim db As NotesDatabase Dim view As NotesView Dim doc As NotesDocument Dim thisdoc As NotesDocument Dim listAbtFil List As String Dim zaehler As Integer Set thisdoc = ws.CurrentDocument.Document Set db = s.CurrentDatabase Set view = db.getView(ABTFIL) Set doc = view.GetFirstDocument 'Zunächst wird geprüft, wieviele Abteilungen und Filialen es gibt Do While Not(doc Is Nothing) zaehler = zaehler +1 Set doc = view.GetNextDocument(doc) Loop 'Erstellen eines 1-Dimensionalen Arrays der Größe zaehler Redim arrAbtFil (0 To zaehler) As String 'Zurücksetzen des doc-Objektes aus die Startposition Set doc = view.GetFirstDocument 'Zurücksetzen des Zählers auf 0 zaehler = 0 'Einfügen der Werte in das Array Do While Not(doc Is Nothing) arrAbtFil(zaehler) = doc.ColumnValues(0) Set doc = view.GetNextDocument(doc) zaehler = zaehler +1 Loop thisdoc.abtFil = arrAbtFil End Sub