Hallo zusammen,
ich habe eine Maske mit
FELD1 = Textfeld (Thema)
FELD2 = Textfeld (Body)
FELD3 = Datum (Mehrfachwerte zulassen getrennt durch Komma)
Ich möchte über einen Button einen Kalendereintrag erstellen lassen.
Dies funktioniert auch. Sind jedoch im FELD3 mehrere Werte (= mehrere Datums) hinterlegt wird immer nur der 1. Termin in den Kalender eingetragen.
Anbei mein Code:
Code
Sub Click(Source As Button)
Dim uidoc As NotesUIDocument
Dim workspace As New NotesUIWorkspace
Dim quelldoc As notesdocument
Dim picklist As Variant
Dim session As New NotesSession
Dim reg As New NotesRegistration
Dim db As NotesDatabase
Dim dbmail As NotesDatabase
Dim doc As NotesDocument
Dim docmail As NotesDocument
Dim docansw As NotesDocument
Dim dochaupt As NotesDocument
Dim doccol As notesdocumentcollection
Dim ndt As NotesDateTime
reg.RegistrationServer = "SERVER"
Call reg.GetUserInfo(session.UserName, , mailfile$)
Set dbmail = session.Getdatabase("SERVER", mailfile$,False)
Set doc = dbmail.CreateDocument
Set uidoc = workspace.CurrentDocument
Set quelldoc = uidoc.Document
Dim dateTime As NotesDateTime
Set dateTime = New NotesDateTime("11:00 AM")
doc.Form = "Appointment"
doc.Subject = quelldoc.FELD1(0)
doc.Body = quelldoc.FELD2(0)
Call doc.ReplaceItemValue( "_ViewIcon", 108 )
Call doc.ReplaceItemValue( "$PublicAccess", "1" )
Call doc.ReplaceItemValue("BookFreeTime", "")
Call doc.ReplaceItemValue("ExcludeFromView", Evaluate(|"D":"S"|) )
Call doc.ReplaceItemValue("$ExpandGroups", "3")
Call doc.ReplaceItemValue("$FromPreferredLanguage", Evaluate("@LanguagePreference([Content])"))
Call doc.ReplaceItemValue("$NoPurge", bisDateTime)
doc.AppointmentType = "4"
Set ndt = New NotesDateTime(quelldoc.FELD3(0))
Set ndt2 = New NotesDateTime(quelldoc.FELD3(0))
doc.StartDate = ndt.LSLocalTime
doc.CalendarDateTime = ndt.LSLocalTime
doc.StartDateTime = dateTime.LSLocalTime
doc.EndDate = ndt2.LSLocalTime
doc.EndDateTime = dateTime.LSLocalTime
Call doc.ComputeWithForm(True, False)
Call doc.Save( True, True )
End Sub
Alles anzeigen
Hat jemand eine Idee woran es liegen könnte?