C
camelot91
Помогите начинающему программисту, как переделать этот код, что бы он выполнял тоже самое но через массив. Что бы все это заносилось в массив. Будьте благосклонны господа.
Код:
Dim sview As NotesView
Dim db As NotesDatabase
Dim sess As NotesSession
Dim sdoc As NotesDocument
Dim rdoc As NotesDocument
Dim line1 As String ,lineAll As String
Dim mydoc As Variant
Dim ws As NotesUIWorkspace
Sub Click_FormClist(rDoc As NotesDocument, ruidoc As NotesUIDocument)
Set ws = New NotesUIWorkspace '!!!!!!!!!!!!!!!
Set sess = New NotesSession
Dim qdoc As NotesDocument
If Not ruidoc.EditMode Then
ruidoc.EditMode =True
End If
Set db = sess.CurrentDatabase '!!!!!!!!!!!!!!!!!!!!
Set sview = db.GetView("Dolgi")
If sview Is Nothing Then
MessageBox "Нет нужного представления"
Exit Sub
End If
Set sdoc = sview.GetFirstDocument
line1 = ""
lineAll = ""
Do While Not sdoc Is Nothing
line1 = line1 & sdoc.GetItemValue("ToDate")(0) & " " & line1 & sdoc.GetItemValue("Year")(0) & "-" & sdoc.GetItemValue("RegNum")(0) & sdoc.GetItemValue("Lit")(0) & " " & sdoc.GetItemValue("ToName")(0) & Chr(10)
lineAll = lineAll & line1
line1 = ""
Set sdoc = sview.GetNextDocument(sdoc)
Loop
Print lineAll
Call rDoc.ReplaceItemValue("clist",lineAll)
End Sub