Hi
Im using LS code below to output data from a HRview to a textfile(which is used for import on another system).
Problem is, the textfile has a " at the start and end of every line, making the other system unable to read it. Anyone know how to
1)Prevent the " from appearing in the first place
or…
2)programatically remove the " from the file after creation
Thanks!!
Sub Initialize
filenum = Freefile()
filename = "\\server\d$\tmp\thefile.txt"
Open fileName For Output As fileNum
Dim sess As New notessession
Dim db As notesdatabase
Dim dc As notesdocumentcollection
Dim view As NotesView
Dim doc As notesdocument
Dim success As Variant
Set db = sess.CurrentDatabase
Set view = db.GetView("MyView")
’ Set dc = view.AllEntries
Set doc = view.GetFirstDocument
Do Until doc Is Nothing
Print "Retrieving data from doc"
'success = doc.ComputeWithForm( False, False )
'If success Then
' Call doc.Save( True, True )
'End If
firstname=doc.GetItemValue("FirstName")
firstname=Fulltrim(firstname)
lastname=doc.GetItemValue("LastName")
lastname=Fulltrim(lastname)
cellphonenumber=doc.GetItemValue("CellPhoneNumber")
cellphonenumber=Fulltrim(cellphonenumber)
officephonenumber=doc.GetItemValue("OfficePhoneNumber")
officephonenumber=Fulltrim(officephonenumber)
employeenumber=doc.GetItemValue("employeenumber")
employeenumber=Fulltrim(employeenumber)
department=doc.GetItemValue("Department")
department=Fulltrim(department)
sub_department=doc.GetItemValue("Sub_department")
sub_department=Fulltrim(sub_department)
location=doc.GetItemValue("Location")
location=Fulltrim(location)
jobtitle=doc.GetItemValue("JobTitle")
jobtitle=Fulltrim(jobtitle)
leder=doc.GetItemValue("leder")
leder=Fulltrim(leder)
'Her skal det legges inn Lotus Notes
fullname=doc.GetItemValue("FullName")
Dim nam As notesname
Set nam=sess.CreateName(fullname(0))
fullname=nam.Abbreviated
internetaddress=doc.GetItemValue("InternetAddress")
internetaddress=Fulltrim(internetaddress)
officephonenumbershort=doc.GetItemValue("OfficePhoneNumberShort")
officephonenumbershort=Fulltrim(officephonenumbershort)
Write #filenum, firstname(0)+";"+lastname(0)+";"+cellphonenumber(0)+";"+officephonenumber(0)+";"+employeenumber(0)+";"+department(0)+";"+sub_department(0)+";"+location(0)+";"+jobtitle(0)+";"+leder(0)+";"+"Lotus Notes"+";"+fullname+";"+internetaddress(0)+";"+officephonenumbershort(0)+";"+"1"
Set doc = view.GetNextDocument(doc)
Loop
End Sub