stimmt.
Hab ich auch. Meine Zeilen hatte ich vor der Zuweisung. *grr.
ich häng das schript mal rein:
Dim session As New NotesSession
Dim db As NotesDatabase
Dim doc As NotesDocument
Dim coll As NotesDocumentCollection
Set db=Session.CurrentDatabase
Set coll=db.UnprocessedDocuments
Dim rt As NotesItem
Dim var As String
If coll.count>0 Then
For Count = 1 To coll.Count
Set doc=Coll.GetNthDocument(Count)
Set rt = doc.GetFirstItem("Historie")
var = Explode(rt.Text, Chr(13) +Chr(10))
MsgBox var ,MB_OK , Historie
doc.Lagerort = "MSC"
doc.Status = "im MSC"
doc.Historie = "wurde geändert von"
Call doc.Save (True, False)
Next
End If
und die funktion explode hier aus dem forum:
Function Explode(strWert As String, tz As String) As Variant
Dim arrWerte() As String
Dim i As Integer
Do While Not strWert = ""
If StrRight(strWert,tz) <> "" Then
ReDim Preserve arrWerte(i)
arrWerte(i) = StrLeft(strWert,tz)
strWert = StrRight(strWert,tz)
Else
strWert = ""
End If
i = i + 1
Loop
Explode = arrWerte
End Function
und dann bringt er mir:
attempt to access uninitialized dynamic array
gruß thomas