How To Extract Appointment Information from Schedule Plus 7.0

Article translations Article translations
Article ID: 161298 - View products that this article applies to.
This article was previously published under Q161298
This article has been archived. It is offered "as is" and will no longer be updated.
Expand all | Collapse all

SUMMARY

The OLE Scheduling Library exposes an object model for Microsoft Schedule Plus 7.0 that can be manipulated by the VBA language. This object model allows programmers to gain access to appointment information. This article provides a code sample of how to extract appointment information between two given dates from Schedule Plus.

MORE INFORMATION

  1. Start a new Standard EXE project. Form1 is added by default.
  2. Place a CommandButton on Form1.
  3. Add the following code to the General Declarations section of Form1:
                Option Explicit
    
          Private Sub Command1_Click()
             GetAppointments "06/03/96", "08/03/96" 'dd/mm/yy format
          End Sub
    
          Sub GetAppointments(sStartdate As String, sEndDate As String)
             Dim objSchdPlus As Object
             Dim gobjappt As Object
             Dim objappt As Object
             Dim objitem As Object
             Dim obatt As Object
             Screen.MousePointer = vbHourglass
             Set objSchdPlus = CreateObject("SchedulePlus.Application")
             objSchdPlus.Logon
             Set gobjappt = objSchdPlus.ScheduleSelected
             Print objSchdPlus.UserName
             Set objappt = gobjappt.singleappointments
             Set objitem = objappt.Item()
             Print objappt.Rows
             While Not objappt.IsEndOfTable
                Set objitem = objappt.Item()
                If CDate(objitem.start) >= _
                   CDate(Format$(sStartdate, "dd/mm/yy") & " 00:00:00") And _
                   CDate(objitem.end) _
                   <= CDate(Format$(sEndDate, "dd/mm/yy") & " 23:59:59") Then
                   Print "Starts " & objitem.start & "---" & "Ends ";
                   Print objitem.end
                   Print "Appointment := " & objitem.Text
                End If
                objappt.Skip
             Wend
             Screen.MousePointer = vbArrow
             MsgBox "Done"
          End Sub
    						
  4. Press the F5 key to run the project. When you click on the button, the appointments that fall into the date range specified will be printed on the form.

REFERENCES

OLE Scheduling is documented in the Microsoft Schedule+ Programmer's Guide found under Microsoft Exchange Server in the BackOffice SDK on the Microsoft Developer Network (MSDN).

The Mastering Series for Exchange Development, also available from Microsoft, has extensive Visual Basic code samples and explanations relating to OLE Scheduling.

Properties

Article ID: 161298 - Last Review: October 4, 2013 - Revision: 2.3
APPLIES TO
  • Microsoft Visual Basic 5.0 Professional Edition
  • Microsoft Visual Basic 5.0 Enterprise Edition
Keywords: 
kbnosurvey kbarchive kbhowto kbprogramming KB161298

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com