AppointmentItem.Send Method (Outlook)
Sends the appointment.
The Send method sends an item using the default account specified for the session. In a session where multiple Microsoft Exchange accounts are defined in the profile, the first Exchange account added to the profile is the primary Exchange account, and is also the default account for the session. To specify a different account to send an item, set the SendUsingAccount property to the desired Account object and then call the Send method.
This Visual Basic for Applications (VBA) example uses CreateItem to create an appointment. The example sets the MeetingStatus property to olMeeting to indicate the appointment as a meeting request, and sets a required attendee, an optional attendee, and a meeting location as a resource. The example then displays and sends the appointment item.
Sub CreateAppt() Dim myItem As Object Dim myRequiredAttendee, myOptionalAttendee, myResourceAttendee As Outlook.Recipient Set myItem = Application.CreateItem(olAppointmentItem) myItem.MeetingStatus = olMeeting myItem.Subject = "Strategy Meeting" myItem.Location = "Conf Rm All Stars" myItem.Start = #9/24/2009 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("Conf Rm All Stars") myResourceAttendee.Type = olResource myItem.Display myItem.Send End Sub