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

  1. Start a new Visual Basic project. Form1 is created by Default.

  2. Add a Command button to Form1.

  3. 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
    
    

  4. 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.


Additional reference words: 4.00 vb4win vb4all
KBCategory: kbinterop kbusage kbhowto
KBSubcategory: PrgOther




THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: December 3, 1996
©1997 Microsoft Corporation. All rights reserved. Legal Notices.