Hallo Leute,
ich nutze folgendes Skript (aus eknori´s Schatzkiste).
Es erstellt einen Eintrag im Kalender des Users.
Allerdings, und das würde ich gerne vrhindern, auch
einen Eintrag in ENTWÜRFE im MAILORDNER des Users.
Hat dazu jemand eine Idee ?
Ciao
Don Pasquale
Sub createReminder( dateTime As notesDateTime, JNAlarm As String, popUpStr As String, subjectStr As String, infoStr As String ,DocID As String)
Dim ICON As NotesItem
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)
Set Icon = New NotesItem ( reminderDoc , "_ViewIcon" , 83 ) ' Icon = Daumenhoch
ICON.IsSummary = True
With reminderDoc
.Form = "Appointment"
.ReplaceItemValue "$Alarm", 1
.ReplaceItemValue "$AlarmDescription", popUpStr
.ReplaceItemValue "$AlarmMemoOptions", ""
.ReplaceItemValue "$AlarmOffset", 0
.ReplaceItemValue "$AlarmUnit", "M"
.ReplaceItemValue "Location", ""
' .ReplaceItemValue "ExcludeFromView", "D"
' .ReplaceItemValue "ExcludeFromView", "E"
.ReplaceItemValue "NoticeType", "R"
.ReplaceItemValue "tmpDoNotProcess", "1"
.Subject = subjectStr
.Alarms = JNAlarm
.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.AddTab( 2 )
Call rtitem.AppendDocLink( doc, db.Title )
reminderDoc.ComputeWithForm True,True
reminderDoc.save True,False
reminderDoc.PutInFolder( "$Alarms" )
Print "Wiedervorlage erstellt"
Else
Print "Fehler: Kann die Maildatei nicht öffnen"
End If
End Sub