shadowsanders
IS-IT--Management
I am using the following to post a file to a network location. Now I am being asked to upload the same file to an FTP site. Can anyone tell me how this code would need to be modified to accomplish this?
Sub Initialize
Dim s As New NotesSession
Dim db As NotesDatabase
Dim view As NotesView
Dim doc As NotesDocument
Dim nbcol As Integer
Dim k As Integer
Dim newline As String
Dim fileName As String
Dim fileNum As Integer
Dim item As NotesItem
Set db = s.CurrentDatabase
Set view = db.GetView( "Send To JDE" )
nbcol = Ubound(view.Columns)
Set doc = view.getfirstdocument
fileName "\\nt490001.spb.com\group\CC\Credits\Credits.csv"
fileNum = Freefile()
Open fileName For Append As fileNum
k = 0
While Not (doc Is Nothing)
newline = ""
For k = 0 To nbcol
newline = newline + doc.ColumnValues(k)
If k <> nbcol Then newline = newline + ","
Next
Print #fileNum, newline
Set doc = view.GetNextDocument(doc)
Wend
Close fileNum
End Sub
Sub Initialize
Dim s As New NotesSession
Dim db As NotesDatabase
Dim view As NotesView
Dim doc As NotesDocument
Dim nbcol As Integer
Dim k As Integer
Dim newline As String
Dim fileName As String
Dim fileNum As Integer
Dim item As NotesItem
Set db = s.CurrentDatabase
Set view = db.GetView( "Send To JDE" )
nbcol = Ubound(view.Columns)
Set doc = view.getfirstdocument
fileName "\\nt490001.spb.com\group\CC\Credits\Credits.csv"
fileNum = Freefile()
Open fileName For Append As fileNum
k = 0
While Not (doc Is Nothing)
newline = ""
For k = 0 To nbcol
newline = newline + doc.ColumnValues(k)
If k <> nbcol Then newline = newline + ","
Next
Print #fileNum, newline
Set doc = view.GetNextDocument(doc)
Wend
Close fileNum
End Sub