I have an agent which fetch the vendors statement from the backend(oracle).
now i want’s to write the vendors statement on txt file and send to their email address.
i do not know how to write to txt file
please help me.
I have an agent which fetch the vendors statement from the backend(oracle).
now i want’s to write the vendors statement on txt file and send to their email address.
i do not know how to write to txt file
please help me.
Subject: writing to .txt file
search in the help files for these statements : (LotusScript)
Open
Print #
Write #
Close
example code :
Dim nVar As Variant, eVar As Variant
nVar = NULL
Dim fileNum As Integer
fileNum% = FreeFile()
Open “printext.txt” For Output As fileNum%
’ Print two lines to the file and close it.
’ First line: two String values, with no separation between.
Print #fileNum%, "First line, " ; “with two String items”
’ Second line: NULL value, EMPTY value, Integer variable
’ value, and String value, separated on the line by tabs.
Print #fileNum%, nVar, eVar, fileNum%, “at next tab”
Close fileNum%
’ Open the file, print it, and close the file.
Dim text As String
Open “printext.txt” For Input As fileNum%
Do Until EOF(fileNum%)
’ Read and print to console, one line at a time.
Line Input #fileNum%, text$
Print text$
Loop
Close fileNum%
’ Output:
’ First line, with two String items
’ NULL 1 at next tab
Subject: Or check out the new NotesStream class instead
Subject: RE: Or check out the new NotesStream class instead
And keep in mind that writing to a file requries VERY high level of access for the agent signer.