... mal so als ansatz:
Sub Click(Source As Button)
Dim session As New NotesSession
Dim docMail As NotesDocument
Dim db As New NotesDatabase( "", "" )
Dim workspace As New NotesUIWorkspace
Dim uidoc As NotesUIDocument
Dim arrViews(2) As String
arrViews(0) = "D"
arrViews(1) = "A"
arrViews(2) = "S"
Dim item As NotesItem
Dim eval As Variant
Dim doc As notesdocument
Dim dateTime As NotesDateTime
Set uidoc = workspace.CurrentDocument
Set doc = uidoc.Document
varDummy = eingabepruefen(uidoc)
If Not varDummy Then
Msgbox "Fehler gefunden !",16,"Achtung !"
Continue = False
Exit Sub
End If
eval = Evaluate(|@Explode(@TextToTime(@Text(von_dat) + "-" + @Text(bis_dat)))| , doc)
Forall x In eval
x = x + " 04:00:00"
End Forall
Dim datev() As Variant
For i = 0 To Ubound(eval)
Redim Preserve datev (i + 1)
datev (i) = Cdat (eval(i))
Next
'Messagebox Datatype(datev(0))
Call db.OpenMail
'Messagebox( db.Title & " on server " & db.Server )
Set docMail = New NotesDocument(db)
docMail.form = "Appointment"
docMail.AppendEndTime = Cdat("20:00:00")
docMail.AppendStartTime = Cdat("04:00:00")
docMail.AppointmentType = "2"
docMail.CalendarDateTime = datev
docMail.Chair = session.Username
docMail.ExludeFromView = arrViews
docMail.From = session.Username
docMail.Logo = "StdNotesLtr2"
docMail.MailOptions = "0"
docMail.OrgTable = "P0"
docMail.Subject = " urlaub aus planung"
Set item = docMail.ReplaceItemValue( "_Viewicon", 148 )
Call docMail.Save(True, False)
End Sub
die feldnamen müssen angepasst werden, u.a.
keine garantie für fehlfunktionen
das thema ist nicht ganz ohne, speziell wenn man im kalender daten einträgt und irgendjemand synct das mit seinem palm, etc. das kann böse fehler (bis zum absturz des palm) verursachen.
ohne dir nahe treten zu wollen: LASS DIE FINGER DAVON