The GetFreeBusy method returns a string representing the availability of the recipient for a meeting over a specified period of time.
strAvail = objRecipient.GetFreeBusy(StartTime, EndTime, Interval)
The returned string length equals the number of time slots between StartTime and EndTime. Each character is the ASCII representation of the appropriate type library constant indicating the recipient's availability during a time slot:
ASCII character |
Corresponding type library constant |
Meaning |
---|---|---|
"0" | CdoFree | Available for appointments or meetings throughout the time slot |
"1" | CdoTentative | At least one tentative commitment during the time slot |
"2" | CdoBusy | At least one confirmed commitment during the time slot |
"3" | CdoOutOfOffice | Designated as out-of-office (OOF) for at least part of the time slot |
If there is any overlapping of commitments during a time slot, GetFreeBusy returns the most committed state, that is, the highest character value. For example, if a recipient already has one tentative meeting and one confirmed meeting scheduled during the same time slot, GetFreeBusy returns "2" for that time slot, corresponding to CdoBusy. CdoFree is not returned unless the entire time slot is free of commitments.
For performance reasons, calendaring clients typically do not publish appointments indefinitely into the future. For example, the CDO Library, Microsoft® Outlook™, Microsoft® Schedule+, and Microsoft Outlook Web Access (OWA) all publish appointments for a default maximum of three months past the current date. This means that if you call GetFreeBusy on a messaging user and specify time slots more than three months in advance of that user's current date, GetFreeBusy is likely to return CdoFree for every such time slot. Unless you are familiar with the behavior and publishing limits of a messaging user's calendaring client, you should not interpret CdoFree as meaning that the user is genuinely free for a time slot significantly in the future.
If a recipient represents a distribution list, the status of its individual members cannot be returned to you. A meeting request should be sent only to single messaging users. You can determine if a messaging user is a distribution list by checking the DisplayType property of the AddressEntry object representing that user. You can obtain the AddressEntry object underlying a recipient from the Recipient object's AddressEntry property.