Platform SDK: Exchange Server

Schedule Object

The Schedule object represents an entire schedule that contains all appointments, projects, tasks, alarms, events, and contacts for a single user. In most cases, a Visual Basic program opens the currently logged-on user's schedule. However, you can manipulate any schedule belonging to any user (subject to access privileges). For example, you can write an application that opens the schedules of everyone in a department and downloads the contents of everyone's Contacts table into a Microsoft Access database.

The following sample code shows how to create an Application object and then retrieve the Schedule object from the topmost open schedule:

Dim objApp As Object
Dim objSched As Object

Set objApp = CreateObject("SchedulePlus.Application")

'Retrieve the Schedule object for the topmost open schedule.
Set objSched = objApp.ScheduleSelected
 

The ScheduleLogged data member returns the Schedule object of the current user. To access another schedule, specify which schedule you want to work with by using the Application object's ScheduleForFile or ScheduleForUser method. Both of these methods return a Schedule object. After retrieving the Schedule object, you can retrieve any Table object shown in the diagram and manipulate individual items within these tables.