Article ID: 147283 - View products that this article applies to.
This article was previously published under Q147283
This article has been archived. It is offered "as is" and will no longer be updated.
Within Visual FoxPro, you can take advantage of the OLE Automation capabilities of Schedule+ 7.0 to read or modify your appointments, contacts, task list, and projects.
Schedule+ 7.0 doesn't export an OLE Automation Type library as you might be used to. What it does expose is the ability to gain access to table objects within the Schedule+ object. You can navigate these table objects by using exposed Schedule+ 7.0 methods.
The Appointment table is one table you might want to examine from inside a Visual FoxPro application. You can use the Schedule+ 7.0 Skip method to maneuver through the table in a manner similar to what you might do with a Visual FoxPro table. And you can use the Schedule+ 7.0 GetRows() method, which is quite similar to a SELECT INTO ARRAY. There are also SetRange and SetRestriction methods that give you filtering capability to specify the records you want to search.
The following three code samples show some of the basic functions that can be performed:
Code Sample to Create New Schedule AppointmentsThe following code shows how to use the NEW method to add 100 appointments for 1996. It creates a start and end datetime string for each appointment along with some text that denotes it as a test.
Code Sample to Remove Scheduled AppointmentsThe following code shows how to use OLE Automation to automate Schedule+ 7.0 to remove all tentative appointments, which are denoted by a BUSYTYPE!=1. It also shows how to use the SKIP and DELETEITEM methods.
Code Sample to Read Scheduled Appointments and Populate a GridThe following code shows how to use the GetRows() method to pass through the OLE layer once for each 100 records. This is a large performance increase over using the Skip method to move to each records and grab its attributes. Specifically, the code shows how to use OLE Automation to automate Schedule+ and populate a grid with the appointments.
For more information on this, please consult the Schedule+ help file provided with the Exchange Developers Kit or contact the Exchange/Schedule+ product support team.