Hallo hier mein Script
Sub Initialize
Dim session As New notessession
Dim db As notesdatabase
Dim doc As Notesdocument, profdoc As Notesdocument
Dim servername As String, dateipfad As String, aktfile As String
Dim fileNum As Integer, cells As Integer, k As Long
Dim fileName As String
Dim InputStr As String, delimiter As String
Dim FieldArray As Variant
Dim view As NotesView
Set db = session.currentdatabase
Set profdoc = db.getprofiledocument("(Konfiguration)")
servername = profdoc.Server(0)
dateipfad = profdoc.Dateiname(0)
fileNum = Freefile()
Set view = db.GetView ("Test")
'Trennzeichen
delimiter = ";"
aktfile = Dir$( servername & "\" & dateipfad & "*.*",0)
If aktfile <> "" Then
Open aktfile For Input As fileNum%
Line Input #1, InputStr$
Do While Not Eof(fileNum%)
Line Input #1, InputStr$
FieldArray = Split(InputStr$,delimiter, -1, 0)
If Not Isempty(FieldArray) Then
Set doc = view.GetDocumentByKey(FieldArray(2))
If Not doc Is Nothing Then
Call doc.ReplaceItemValue("Bestelldatum", Today)
Call doc.Save(True,True)
End If
End If
Loop
Messagebox "Datei nicht vorhanden", 16, "Fehler"
End If
Close fileNum%
End Sub
Die Datei heist Test.txt und liegt auf nem Laufwerk W: