Compartilhar via


Forwarding a Meeting Request

Topic Last Modified: 2006-06-12

Forwarding a meeting request is similar to forwarding any message. If an attendee forwards a meeting request to someone else and that person responds to the meeting request, the response is sent to the meeting organizer.

For information about how to invite new attendees to a meeting that is already saved to your calendar, see Inviting Attendees to a Meeting in the Calendar Folder.

To forward a meeting request

  1. Open the meeting request in your inbox by using a Calendar Message object, as shown in Processing a Calendar Message.
  2. Create a new Message object from the Calendar Message object by using the IMessage.Forward method.
  3. Address the new message, and then add any text you want.
  4. Call the IMessage.Send method to send the new message.

The code in the following example gets calendar messages with the subject "Documentation Review Meeting" from the inbox of a specific user. If the calendar message is a meeting request, it is automatically forwarded to the other users.

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 ForwardRequest(iCalMsg As CDO.CalendarMessage, iMbx As IMailbox, EmailAddrs As String, strComment As String)

    Dim iCalPart As CDO.ICalendarPart
    Dim iMsg As CDO.Message
    Dim Conn As New ADODB.Connection
    Conn.Provider = "ExOLEDB.DataSource"
    Conn.Open iMbx.BaseFolder

    Dim Config As New CDO.Configuration
    Config(cdoActiveConnection).Value = Conn
    Config(cdoMailboxURL) = iMbx.BaseFolder
    Config.Fields.Update

    ' Make sure the message is a request.
    For Each iCalPart In iCalMsg.CalendarParts
        If iCalPart.CalendarMethod = "REQUEST" Then
            Set iMsg = iCalMsg.Message.Forward
            Set iMsg.Configuration = Config
            iMsg.To = EmailAddrs
            iMsg.TextBody = strComment
            iMsg.Send
            Exit For
        End If

    ' Clean up.
    Conn.Close
    Set Conn = Nothing

End Sub