Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Writing to Sequential TXT File on C Drive

Status
Not open for further replies.

cwf7777

Programmer
Nov 26, 2004
1
US
I am trying to get a script that will allow me to get the information in a field on a form and write it to a text file using the Open Filename for Append.. I cannot get the fild data to work with the wrtie command??
 
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top