Muss nur noch die genaue Formel damit erstellen!???
Ich stehe in einer Ansicht (A1) auf einem Dokument und löse eine Aktion aus.
...
Sub Exiting(Source As Field)
Set View = .....
schalte mal Option Declare ein
Dim doc as NotesDokument
Set doc = view.GetAllDocumentsByKey("A_USER")
Set doc = view.GetAllDocumentsByKey("A_USER")
Set dc = view.GetAllDocumentsByKey("Spanish leather", False)
Sub Initialize
Dim session As New NotesSession
Dim db As NotesDatabase
Dim view As NotesView
Dim dc As NotesDocumentCollection
Dim keyString As String
keyString = Inputbox("Subject starts with?")
Set db = session.CurrentDatabase
Set view = db.GetView("By Category")
Set dc = view.GetAllDocumentsByKey(keyString, False)
Set doc = dc.GetFirstDocument()
If dc Is Nothing Then
Messagebox keyString,, "Not found"
Exit Sub
End If
While Not(doc Is Nothing)
Messagebox doc.Subject(0)
Set doc = dc.GetNextDocument(doc)
Wend
End Sub
Set doc = dc.GetFirstDocument()
Und schalte doch mal Option declare ein.
Ja, da stimme ich Dir zu. Nur wo siehst Du das in dem Code VOR dem While() ? ;)ZitatSet doc = dc.GetFirstDocument()
Wer lesen kann, ist eindeutig im Vorteil.
Sub Click(Source As Button)
Dim session As New NotesSession
Dim db As NotesDatabase
Dim view As NotesView
Dim dc As NotesDocumentCollection
Set db = session.CurrentDatabase
Set view = db.GetView( "A1" )
Set dc = view.GetAllDocumentsByKey("A_USER")
While Not(doc Is Nothing)
Call doc.ReplaceItemValue("Status", "7")
Call doc.Save( True, False )
Set doc = collection.GetNextDocument(doc)
Wend
End Sub
ZitatUnd schalte doch mal Option declare ein.
Das haben wir schon ein paar Mal empfohlen: er hört aber nicht auf uns !
Sub Click(Source As Button)
Dim session As New NotesSession
Dim db As NotesDatabase
Dim view As NotesView
Dim dc As NotesDocumentCollection
Dim doc As NotesDokument
Set db = session.CurrentDatabase
Set view = db.GetView( "A1" )
Set dc = view.GetAllDocumentsByKey("A_USER")
Set doc = dc.GetFirstDocument()
While Not(doc Is Nothing)
Call doc.ReplaceItemValue("Status", "7")
Call doc.Save( True, False )
Set doc = collection.GetNextDocument(doc)
Wend
End Sub
Habe das Script jetzt so geändert.
Kann aber leider declare nicht einschalten, da das Script sich nicht speichern lässt.
Class or Type not found: Notesdocument
Tut mir leid, wenn ich so oft nachfargen muss. Hoffe ich komme bald dahinter!
Danke