"Unbooking" a resource in Outlook 2003

C

Curtis Justus

Hi there,

I have the following situation:

1. User creates appointment
2. User adds a resource
3. User fills out some custom information.

I need to validate the status of the appointment before allowing it to be
saved (i.e. cannot book more than one resource). Unfortunately, the
resource(s) are automatically booked before my validation code is called. I
have put code in the appointment.Write event and also the
OutlookApplication.ItemSend event. In actuality, the ItemSend event never
fires when the booking takes place. I believe the sequence goes as follows:

1. User clicks save / send.
2. Resource is booked.
3. Appointment.Write is fired.
4. OutlookApplication.ItemSend is fired.

I guess here are my questions:

1. Can I somehow get code in place where I can validate the appointment
before resources are booked?
2. Can I "unbook" a resource from within my appointment.Write event?

Thanks for your help,
cj
 
K

Ken Slovak - [MVP - Outlook]

"Booking" a resource adds that resource as a Recipient for the item, as a
Bcc recipient. There are no Recipient/Recipients events, but you can try
handling the Item.Change() event. My guess is it won't fire in that case
though until the item is saved or sent.

You certainly can check the Recipients collection on Write() or Send() for
any that are Recipient.Type == OlMeetingRecipientType.olResource (3).
 
S

Sue Mosher [MVP-Outlook]

You can use the Receipient.FreeBusy method to return availability information
for the resource. Do that before you call Write.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top