Hello,
I have an agent which creates a TXT file from lotus notes document. The output comes like this,
“10SNE1”,“HCM0001”,“”,“Company1”,“A0058397F”,“123”,“123”,“”,“tata”,“F00723996”
I want to remove quotes, and wants an output like this,
10SNE1,HCM0001, ,Company1,A0058397F",123,123, ,tata, F00723996
Any idea how to do that?
Thanks
MS
Here is an agent which I run,
Sub Initialize
Dim bFileOpen As Integer
Dim FileName As String
Dim fileNum As Integer
Dim session As New NotesSession
Dim db As NotesDatabase
Set db = session.CurrentDatabase
Dim view As NotesView
Dim doc As NotesDocument
Set view = db.GetView( "view1" )
'Get the first document
Set doc = view.GetFirstDocument
’ first get an unused file number from the system
fileNum = Freefile()
’ open file for output
Open "C:\Test1.txt" For Output As fileNum
Do While Not(doc Is Nothing)
’ move fields to variables
out_Firstname = doc.Getitemvalue("firstname")
out_Lastname= doc.Getitemvalue("lastname")
out_Dealer_Type2= doc.Getitemvalue("Dealer_Type2")
out_Company = doc.Getitemvalue("company")
Out_randomp = doc.Getitemvalue("randomp")
’ write out string
Write #fileNum, out_Firstname(0),out_Lastname(0),out_Dealer_Type2(0),out_Company(0) ,out_randomp(0)
’ 'Move onto next document in the view
Set doc = view.GetNextDocument(doc)
Loop
'Close file and terminate.
Close fileNum
Exit Sub
End Sub