Using the Cancel Appointment Sample Application
Topic Last Modified: 2006-06-11
The Cancel Appointment sample application consists of a Microsoft® Visual C++® executable file that can be run from the command line. The following table contains the command-line arguments that are used and their descriptions.
Note
To cancel an appointment from a user's calendar, you must be logged on as that user.
Argument | Description |
---|---|
user |
The e-mail address of the user. |
subject |
The subject of the appointment. |
location |
The location of the meeting. |
beginningTime |
The beginning of the time range in which to search for the appointment. Example: 2002-02-05T14:00:00Z. |
endingTime |
The end of the time range in which to search for the appointment. Example: 2002-02-06T14:00:00Z. |
Cancelling Appointments
To cancel an appointment, open up a command window and navigate to the directory where the CancelAppointment.exe file is located. Type "CancelAppointment" followed by the user, subject, location, beginningTime, and endingTime arguments, and then press ENTER. Any appointment found in the user's calendar within the time range specified that matches the specified subject and location will be cancelled. This sample application must be run on a computer running Microsoft Exchange Server 2007 .
The following code cancels any appointment in the Calendaring folder of testuser@fourthcoffee.com from 2PM 2/5/02 to 2PM 2/6/02 with the subject of "Coffee Break", and a location of "1st Floor Kitchen".
Example
C:\>CancelAppointment testuser@fourthcoffee.com "Coffee Break" "1st Floor Kitchen"
"2002-02-05T14:00:00Z" "2002-02-06T14:00:00Z"