Hallo,
ich weiss, das Thema ist schon eininge male hier besprochen worden (das u.a. Script stammt auch hier aus dem Forum), jedoch finde ich den Fehler nicht.
Ich nutze folgenden Agent im pers. Adressbuch, jedoch werden keine Einträge im Kalender erzeugt.
Sub Initialize
Dim s As New NotesSession
Dim address As NotesDocument
Dim dc As NotesDocumentcollection
Dim vw As NotesView
Dim thisdb As NotesDatabase
Dim maildb As New NotesDatabase( "", "" )
Call maildb.OpenMail
Set thisdb = s.CurrentDatabase
Set dc= thisdb.Unprocesseddocuments
Set address=dc.GetFirstDocument
While Not address Is Nothing
txt="Geburtstag von " & address.FirstName(0) & " " & address.LastName(0)
If address.birthday(0)="" Then
Print "Es wurde kein " & txt & " gefunden !"
Goto weiter
End If
Set calentry = New NotesDocument(maildb)
calentry.Form="Appointment"
calentry.AppointmentType="Jahrestag | 1"
calentry.Subject=txt
calentry.StartDate=address.birthday
calentry.CalendarDateTime=address.birthday
calentry.Repeats="1" '
calentry.RepeatFor="5"
calentry.Categories="Geburtstag"
calentry.WebCategories="Geburtstag"
calentry.Chair=s.Username
calentry.tmpOwner=s.Username
calentry.Principal=s.Username
calentry.Alarms="1"
' calentry.OrgRepeat="5"
' calentry.OrgTable="A0"
success = calentry.ComputeWithForm( False, False )
If success Then
Call calentry.Save( True, True )
Print "Kalendereintrag für " & txt & " abgespeichert"
Else
Print "Kalendereintrag für " & txt & " nicht abgespeichert"
End If
weiter:
Set address=dc.GetNextDocument(address)
Wend
End Sub
===============================
Das Feld in der Maske "Person" enthält folgendes:
Feldname: Birthday
Datentyp: Zeit/Datum-Liste oder Zeitraum
Datenlänge: 12 Byte
Seq.-Num.: 8
Doppelte Eintrags-ID: 0
Feld-Flags: SUMMARY
02.05.2005
Da ich nicht so fit in Script bin, weiss ich nicht so recht wo der Fehler liegen könnte.
Wäre echt nett wenn mir einer unter die Arme greifen könnte.
Danke im voraus.
Achim