Hallo zusammen,
hier ist mal der Code des Macros.
Wenn ich die Suchformel aktiviere, bekomme ich einen Syntax-Fehler. Weder die Klammer noch die @-Zeichen können interpretiert werden.
Bin für jede Antwort dankbar.
Gruß
Spalter
Public Sub Notes()
Dim Session As Object
Set Session = CreateObject("Notes.NotesSession")
Dim db As Object
Dim dc As Object
Dim dateTime As Object
Dim view As Object
Dim doc As Object
Dim x As Long
Dim Feld1 As Object
Dim Feld2 As Object
Dim Feld3 As Object
Dim Feld4 As Object
Dim Feld5 As Object
Dim Feld6 As Object
Dim rwindex As Integer
Dim colindex As Integer
Dim Formel As String
Dim Formel1 As String
'++++++++++++++++++++++
Dim Kinfo As String
Dim Kf As String
'geplant:
'*******************************************************
'searchFormula$ = {@Left(@Text(Feldx);2) = "99"}
'Set dc = Wdb.Search(searchFormula$, dateTime, 0)
'Set doc = dc.Getfirstdocument
'*******************************************************
'Bisher: durchlaufen aller Docs einer View
Set db = Session.GETDATABASE("server", "verzeichnis\db.NSF")
'Set db = Session.GETDATABASE("", "db.NSF")
Set view = db.GETVIEW("(AKTIV)")
Set doc = view.GETFIRSTDOCUMENT
x = 2
While Not (doc Is Nothing)
Set Feld1 = doc.GETFIRSTITEM("Feld1")
Kinfo = Right(Left(Feld1.Text, 5), 2)
Set Feld2 = doc.GETFIRSTITEM("Feld2")
Set Feld3 = doc.GETFIRSTITEM("Feld3")
Set Feld6 = doc.GETFIRSTITEM("Feld6")
Kf = Feld6.Text
Set Feld4 = doc.GETFIRSTITEM("Feld4")
Set Feld5 = doc.GETFIRSTITEM("Feld5")
If Kinfo = "99" And Kf = "11111111" Then
Cells(x, 1) = Feld1.Text
Cells(x, 2) = Feld3.Text
Cells(x, 3) = Feld4.Text
Cells(x, 4) = Feld6.Text
'Cells(x, 5) = Feld6.Text
If Feld5.Text = "" Then
Feld5.Text = 0
Cells(x, 7) = "kein Wert"
End If
Cells(x, 12) = Feld5.Text
Cells(x, 14) = Kinfo
x = x + 1
End If
Set doc = view.GETNEXTDOCUMENT(doc)
Wend
End Sub