so ich habe meinen code jetzt mal etwas überarbeitet.
fehler erhalte ich keinen mehr. aber ein antwortmail wird auch nicht generiert.
bin dankbar für jeden tipp.
gruss seppel
Sub Initialize
Dim db As NotesDatabase
Dim session As New NotesSession
Dim memo As NotesDocument
Dim reply As NotesDocument
Dim collection As NotesDocumentCollection
Dim doc As NotesDocument
Dim Wochentag As Integer
Dim Datum As New NotesDateTime("Today")
Wochentag = Weekday(Datum.LSLocalTime)
Set db = session.CurrentDatabase
REM [Action] Mail beantworten
If Wochentag = 1 Then
Set collection = db.UnprocessedDocuments
Set doc = collection.GetFirstDocument()
While Not(doc Is Nothing)
Set reply = memo.CreateReplyMessage( False )
reply.Subject = "Re: " & memo.Subject( 0 )
reply.Body = "Test"
Call reply.Send( False )
Set doc = collection.GetNextDocument(doc)
Wend
Elseif Wochentag = 3 Then
Set collection = db.UnprocessedDocuments
Set doc = collection.GetFirstDocument()
While Not(doc Is Nothing)
Set reply = memo.CreateReplyMessage( False )
reply.Subject = "Re: " & memo.Subject( 0 )
reply.Body = "Test"
Call reply.Send( False )
Set doc = collection.GetNextDocument(doc)
Wend
Else
End If
End Sub