HI
I try to add a appointment with multiple days for vacation in the Notes user Calendar.
here the code
Sub Click(Source As Button)
Dim NotesSession As New NotesSession
Dim workspace As New NotesUIWorkspace
Dim Doc As NotesDocument
Dim db As NotesDatabase
Dim UIDoc As NotesUIDocument
Dim CurDoc As NotesDocument
Dim dbMail As New NotesDatabase( "", "" )
Dim serveur As String
Call dbMail.OpenMail
serveur = dbMail.Server
Set CurDoc = workspace.CurrentDocument.Document
Set db = NotesSession.GetDatabase(serveur,CurDoc.Calendar(0))
Set doc = db.CreateDocument
doc.form = "Appointment"
doc.Subject = "Vacation. (Approved by " & CurDoc.Manager(0) & ") "
Msgbox Str(CurDoc.StartDate(0)) & Chr(13) & Str(CurDoc.CalDays(0))
doc.StartDateTime = CurDoc.StartDate(0)
’ doc.EndDateTime = CurDoc.EndDate(0)
doc.AppointmentType = "2"
doc.Duration = CurDoc.CalDays(0)
doc.ExcludeFromView = "D"
Set UIDoc = Workspace.EditDocument(True,doc)
End Sub
The result when I open the Appointment, I have only the day of today (startDate & EndDate)
For 24 march 2008 to 6 april 2008 I have these values in the MSGBox (so it’s correct!):
24/03/2008
14
what’s wrong?
also… I search a similar problem in the forum but it’s not correct my problem…:
Thanks in advance