Creating Meetings

A meeting is an appointment that has attendees. Before you can create a meeting, Schedule+ must be running in group-enabled mode as a valid user.

    To create a meeting
  1. Create a single or recurring appointment.
  2. Use the New method to add one or more attendees to the appointment.
  3. Set the desired MAPI properties.
  4. Release the objects.

Note The logged-on user does not need to be added as an attendee because that user is the meeting organizer.

The UserDisplay, UserEntryId, UserSearchKey, UserWell, IsUserDistributionList and AttendeeStatus properties are necessary for creating a single attendee. The first three are MAPI properties (PR_DISPLAY_NAME, PR_ENTRY_ID, and PR_SEARCH_KEY) on the Recipient object. Also, the PR_OBJECT_TYPE property is needed to determine whether a recipient is a Distribution List. For more information on these MAPI properties, the Recipient object, and Distribution Lists, see the MAPI Programmer's Reference.

The following sample code shows how to add attendees to an Appointment object:

Public Sub AddAttendee (objItem As Object)
    Dim objAttendee As Object
    Dim objMessage As Object
    Dim objOneRecip As Object
    Const ulPrSearchKey = 806027522 ' 0x300B0102
    Const ulPrObjectType = 268304387 ' 0x0FFE0003

    'Create a new attendee.
    Set objAttendee = objItem.Attendees.New

    'Create the recipient.
    Set objMessage = objSession.Outbox.Messages.Add
    Set objOneRecip = objMessage.Recipients.Add

    objOneRecip.Name = "Dave Whitney"
    objOneRecip.Type = mapiTo
    objOneRecip.Resolve

    'Set recipient properties into an attendee.
    objAttendee.SetProperties _
        UserDisplay:=objOneRecip.AddressEntry.Name _
        UserEntryId:=objOneRecip.AddressEntry.Id _
        UserSearchKey:=objOneRecip.AddressEntry.Fields.Item(ulPrSearchKey), _
        IsUserDistributionlist = CBool(objOneRecip.AddressEntry.Fields.Item(ulPrObjectType) = 8) _
        UserWell:=1, _
        AttendeeStatus:=0
    
    'Release the objects.
    Set objMessage = Nothing
    Set objOneRecip = Nothing
    Set objAttendee = Nothing
End Sub