Compartilhar via


Inviting Attendees to a Meeting in the Calendar Folder

Topic Last Modified: 2006-06-12

You can invite additional attendees to a meeting that already exists in your calendar folder. The IAppointment.Invite method returns a Calendar Message object that you send to the attendees being added.

For information about how to forward a meeting request from your inbox, see Forwarding a Meeting Request.

If the organizer of the meeting invites additional attendees, the meeting in the organizer's calendar folder is updated with the new attendees names. If an attendee invites additional attendees, the attendee list is not updated in the attendees or organizer's calendars. When the new attendees respond to the meeting request, the organizer can choose whether or not to add them to the attendee list.

Because a new meeting request is not automatically sent to existing attendees, their calendars are not updated with the new attendee names.

To invite an attendee to a meeting in the calendar folder

  1. Open a meeting in the Calendar folder as shown in Getting Appointments and Meetings from Folders in Exchange. Be sure to open the appointment in read/write mode by using adModeReadWrite.
  2. Create a Calendar Message object.
  3. Call the IAppointment.Invite method, and then pass the list of attendees to invite by using the Calendar Message object.
  4. Call the ICalendarMessage.Message.Send method to send the message.
  5. Save the updated meeting.

The code in the following example opens a meeting in the calendar folder of a specific user, forwards the meeting to two new attendees, and then saves the updated meeting. In this example, the meeting is selected based on subject.

Example

Visual Basic

' Reference to Microsoft ActiveX Data Objects 2.5 Library
' Reference to Microsoft CDO for Exchange 2000 Library

' Note: It is recommended that all input parameters be validated when they are
' first obtained from the user or user interface.
Sub InviteOthers(iAppt As CDO.Appointment, iMbx As IMailbox, NewList As String)

    Dim Conn As New ADODB.Connection
    Conn.Provider = "ExOLEDB.DataSource"
    Conn.Open iMbx.BaseFolder

    Dim Config As New CDO.Configuration
    'Set the configuration fields
    Config.Fields(cdoActiveConnection) = Conn
    Config(cdoMailboxURL) = iMbx.BaseFolder
    Config.Fields.Update

    iAppt.Configuration = Config
    Set iCalMsg = iAppt.Invite(NewList)

    iCalMsg.Message.Send

    'Save the meeting
    iAppt.DataSource.Save

    ' Clean up.
    Conn.Close
    Set Conn = Nothing

End Sub