RE: Write one field from each doc to textfile LoNo Developer 13.Jul.04 03:17 AM a Web browser Domino Designer -- Agents 4.5.7hOS/2
try this,
Dim sess As New NotesSession
Dim db As NotesDatabase
Dim view As NotesView
Dim doc As NotesDocument
Dim viewName As String
Dim fieldName As String
viewName = "All" ' Put your VIEWNAME here
fieldName = "Name" ' Put your FIELDNAME here
Set db = sess.CurrentDatabase
Set view = db.GetView(viewName)
Set doc = view.GetFirstDocument
filename$ = "c:\AllNos.txt" ' Put your FILENAME here with the exact path
fileNum% = Freefile()
Open fileName$ For Append As fileNum% ' Opening the Text File
While Not doc Is Nothing
Print #fileNum%,doc.GetFirstItem(fieldName).text ' Writing the field value to the text file
Set doc = view.GetNextDocument(doc)
Wend