Microsoft KB Archive/153926

= Microsoft Knowledge Base =

How To Add a New Appointment in Schedule Plus
Last reviewed: December 3, 1996

Article ID: Q153926

The information in this article applies to:


 * Standard, Professional, and Enterprise Editions of Microsoft Visual Basic, 16-bit and 32-bit, for Windows, version 4.0

SUMMARY
This article describes how to use Schedule Plus to maintain a list of appointments to attend. The interface to this procedure is exposed via the MAPI interface. Programmers in Visual Basic can access this procedure and add new appointments to the Schedule Plus database. Below is a code sample showing how to do this.

MORE INFORMATION
 Start a new Visual Basic project. Form1 is created by Default. Add a Command button to Form1.  Place the following code in the General Declarations section of Form1: Option Explicit Private Sub Command1_Click Dim oSchdPlus As Object Dim oContact As Object Dim dStartTime As Date Dim iNumHours as integer Set oSchdPlus = CreateObject("SchedulePlus.application") oSchdPlus.Logon Set oContact = oSchdPlus.ScheduleSelected.SingleAppointments.New dStartTime = "01/04/96 12:15:00" iNumHours = 1 oContact.SetProperties Text:="Santa Claus", _ Start:=dStartTime, End:=DateAdd("h", _    iNumHours, dStartTime), Notes:="Booking xmas presents" oSchdPlus.Logoff End Sub  Press the F5 key to run the project, and click the Command button. Look at the Schedule Plus database and you should see the new appointment.