(Contents)(Previous)(Next)

AddBooking()

Description: Adds a booking to the planner using the passed in key and the passed in start time and number of days.
Syntax: object.AddBooking(plannerKey As Object, tStart As Date, iDays As Number)
Parameters:
object Required, the Planner object
plannerKey The planner key to be associated with the newly created planner booking
tStart The start date of the new planner booking
iDays The duration (in days) of the new planner booking
Remarks: This method adds a planner booking to the planner. The booking is made using the passed in key. It is created starting on the passed in start date and the duration of the booking is set to the passed in number of days. This method is provided as an alternative to adding a booking in the following way:
Set bookings = planner.GetBookings
Set key = planner.GetKeys.GetFirst
Set booking = bookings.Add
booking.SetKey(key)
booking.Value("Start Date") = #12/12/98#
booking.Value("Duration") = 10
Returns: The new planner booking object
Example:
Dim session As Object

Set session = CreateObject("OfficeTalk.Session")

Call session.Logon(login name, password)

Set planner = session.GetPlanners.GetFirst

Set key = planner.GetKeys.GetFirst

Set book = planner.AddBooking(key, #12/12/98#, 5)


Next