'Untitled: Option Public Option Explicit Sub Initialize Dim ws As New NotesUIWorkspace Dim uiview As NotesUIView Dim view As NotesView ' use the workspace to get the current view Set uiview = ws.CurrentView Set view = uiview.View Dim filenames As Variant 'Dim cn As Variant ' Get filename from user using the current ViewName as the default file name filenames = ws.SaveFileDialog( _ False,"File name",, "c:\", uiview.ViewName & ".csv") If Not(Isempty(filenames)) Then Call ViewCSVPrint (view, filenames(0) ) End If End Sub Sub Terminate End Sub Sub ViewCSVPrint (view As Notesview, FileName As String ) Dim fileNum As Integer Dim entry As NotesViewEntry Dim vc As NotesViewEntryCollection Dim rowstring As String Dim cns As String fileNum% = Freefile() Open filename For Output As fileNum% ' use the view column titles as the CSV headers Forall c In view.Columns If cns = "" Then cns = c.title Else cns = cns + +"," + c.title End If End Forall Print #fileNum%, cns ' now get and print the values for each row and column Set vc = view.AllEntries Set entry = vc.GetFirstEntry() While Not entry Is Nothing rowstring = "" Forall colval In entry.ColumnValues If rowstring = "" Then rowstring = colval Else rowstring = rowstring + +"," + colval End If End Forall Print #fileNum%, rowstring Set entry = vc.GetNextEntry(entry) Wend Close fileNum% End Sub