Recipient.Type Property

Outlook Developer Reference

Returns or sets a Long representing the type of recipient. Read/write.

Syntax

expression.Type

expression   A variable that represents a Recipient object.

Remarks

Depending on the type of recipient, this property returns or sets a Long corresponding to the numeric equivalent of one of the following constants:

Example

This Visual Basic for Applications (VBA) example uses CreateItem to create an appointment and uses MeetingStatus to set the meeting status to "Meeting" to turn it into a meeting request with both a required and an optional attendee. The recipient names should be replaced with valid names to avoid errors.

Visual Basic for Applications
  Sub ScheduleMeeting()
    Dim myItem as Outlook.AppointmentItem
    Dim myRequiredAttendee As Outlook.Recipient
    Dim myOptionalAttendee As Outlook.Recipient
    Dim myResourceAttendee As Outlook.Recipient
	
    Set myItem = Application.CreateItem(olAppointmentItem)
    myItem.MeetingStatus = olMeeting
    myItem.Subject = "Strategy Meeting"
    myItem.Location = "Conference Room B"
    myItem.Start = #9/24/2003 1:30:00 PM#
    myItem.Duration = 90
    Set myRequiredAttendee = myItem.Recipients.Add ("Nate Sun")
    myRequiredAttendee.Type = olRequired
    Set myOptionalAttendee = myItem.Recipients.Add ("Kevin Kennedy")
    myOptionalAttendee.Type = olOptional
    Set myResourceAttendee = myItem.Recipients.Add("Conference Room B")
    myResourceAttendee.Type = olResource
    myItem.Display
End Sub

See Also