Adding an appointment into a specific calendar
This example is used to add an appointment into a specific calendar.
// Add an apppointment into a specific calendar
EDT_StartDate is Date
EDT_StartTime is Time
EDT_EndDate is Date
EDT_EndTime is Time
gAPT is Appointment
gCal is Calendar
arrCalendar is array of Calendar
arrCalendar = AppointmentListCalendar()
FOR EACH CurrentCalendar OF arrCalendar
IF CurrentCalendar.Name = "The calendar in which this addition will be performed" THEN
gCal = CurrentCalendar
EDT_StartDate = DateSys()
EDT_StartTime = TimeSys()
EDT_EndDate = DateSys()
EDT_EndDate.Day += 2
EDT_EndTime = TimeSys()
// Adds a new appointment
gAPT.Title = "The title"
gAPT.StartDate = EDT_StartDate + EDT_StartTime
gAPT.EndDate = EDT_EndDate + EDT_EndTime
gAPT.Location = "The location"
gAPT.Content = "My description"
gAPT.TimeZone = ""
gAPT.Author = "The author"
gAPT.Guest = "The guest"
gAPT.WholeDay = True
IF AppointmentAdd(gCal, gAPT) = True THEN