Try something like this
Sub Initialize
Dim session As New NotesSession
Dim db As NotesDatabase
Dim collection As NotesDocumentCollection
Dim doc As NotesDocument
Set db = session.CurrentDatabase
Set collection = db.UnprocessedDocuments
Set doc = collection.GetFirstDocument
fileNum% = Freefile()
fileName$ = "C:\temp\data.txt"
Open fileName$ For Append As fileNum%
Do While Not doc Is Nothing
Write #fileNum%, doc.Name(0), doc.phone(0),doc.address(0)
Set doc = collection.GetNextDocument(doc)
Loop
Close fileNum%
End Sub