Hi,
hier ein Script zum anlegen von Kalendereinträgen:
---snip---
Sub createReminder( dateTime As notesDateTime, popUpStr As String, subjectStr As String, infoStr As String ,DocID As String)
Dim sess As New NotesSession
Dim userMailDb As New NotesDatabase( "", "" )
Dim reminderDoc As NotesDocument
Dim DTItem As NotesItem
Call userMailDb.OpenMail
If userMailDb.IsOpen Then
Set reminderDoc = New NotesDocument( userMailDb )
Dim s As New NotesSession
Dim db As NotesDatabase
Dim view As NotesView
Dim doc As NotesDocument
Dim rtItem As NotesRichTextItem
Set db = s.CurrentDatabase
Set view = db.GetView ("($AllDocID)")
Set doc = view.GetDocumentByKey(DocID)
With reminderDoc
.Form = "Appointment"
.ReplaceItemValue "$Alarm", 1
.ReplaceItemValue "$AlarmDescription", popUpStr
.ReplaceItemValue "$AlarmMemoOptions", ""
.ReplaceItemValue "$AlarmOffset", 0
.ReplaceItemValue "$AlarmUnit", "M"
.ReplaceItemValue "ViewIcon", "67"
.ReplaceItemValue "ExcludeFromView", "D"
.ReplaceItemValue "NoticeType", "R"
.ReplaceItemValue "tmpDoNotProcess", "1"
.Subject = subjectStr
.Categories = popUpStr
.Alarms = "1"
.CalendarDateTime = dateTime.lsLocalTime
.StartDate = dateTime.lsLocaltime
.StartTime = dateTime.lsLocaltime
.StartDateTime = dateTime.lsLocaltime
.EndDate = dateTime.lsLocaltime
.EndTime = dateTime.lsLocaltime
.EndDateTime = dateTime.lsLocaltime
.AppointmentType = "4"
End With
Set rtitem = New NotesRichTextItem( reminderDoc, "Body" )
Call rtitem.AddNewLine( 1 )
Call rtitem.AppendText( infoStr )
Call rtitem.AddNewLine( 3 )
Call rtitem.AppendText( "Bitte klicken Sie hier, um das Dokument zu öffnen --> " )
' Call rtitem.AddTab( 1 )
Call rtitem.AppendDocLink( doc, db.Title )
reminderDoc.ComputeWithForm True, False
reminderDoc.save True,False
reminderDoc.PutInFolder( "$Alarms" )
Print "Wiedervorlage erstellt"
Else
Print "Fehler: Kann die Maildatei nicht öffnen"
End If
End Sub
---snap---
Danke an eknori, dieser Auszug stammt vom Ihm aus seinem Tip bzgl. Wiedervorlage:
http://www.eknori.de/tips/reminder.htmGruss JoFa