|
Charlie, ik heb je een voorbeeld terug gemaild, maar voor de zekerheid plaats ik de code nog even hier:
Sub Click(Source As Button) On Error Goto ErrorHandler Dim ws As New NotesUIWorkspace Dim session As New NotesSession Dim db As NotesDatabase Dim dc As NotesDocumentCollection Dim doc As NotesDocument Dim entry As NotesViewEntry Dim vc As NotesViewEntryCollection Dim View As NotesView Dim UiView As NotesUIView Dim tmp As String Const deli = "," Set db = session.CurrentDatabase Set dc = db.UnprocessedDocuments Set uiView = ws.CurrentView Set View = uiView.View If dc.Count = 0 Then Exit Sub filenames = ws.SaveFileDialog(False,"File name","Comma separated value|*.CSV", "c:\", "testexport.csv") If Isempty(filenames) Then Exit Sub Set vc = View.allEntries fileNum% = Freefile() Open filenames(0) For Output As fileNum% Set doc = dc.GetFirstDocument Do Until Doc Is Nothing Set entry = vc.GetEntry(Doc) tmp$ = "" Forall i In Entry.ColumnValues tmp$ = tmp$ & deli & Cstr(i) End Forall Print #fileNum%, Strright(tmp$,deli) Set Doc = dc.GetNextDocument(Doc) Loop Close fileNum% Exit Sub ErrorHandler: Msgbox Error & " (" & Err & ") op regel " & Erl Exit Sub Resume Next End Sub
Dit is slechts een snel gemaakt voorbeeld, natuurlijk kan dit veel beter en mooier.
|