How to: Create a Meeting Request
Visual Studio 2005
| Note | Required applications |
|---|---|
|
The code example in this topic can be compiled only if you have the required applications installed. For more information, see Features Available by Product Combination. |
|
Note |
|---|
|
This code does not compile if you use the VSTO 2005 SE version of the Outlook 2003 add-in project template. For more information, see Getting Started Programming Application-Level Add-ins. |
This example creates a meeting request in Microsoft Office Outlook 2003 and sends the request to a required attendee.
Example
private void ThisApplication_Startup(object sender, System.EventArgs e) { Outlook.AppointmentItem agendaMeeting = (Outlook.AppointmentItem) this.CreateItem(Microsoft.Office.Interop.Outlook.OlItemType. olAppointmentItem); if (agendaMeeting != null) { agendaMeeting.MeetingStatus = Microsoft.Office.Interop.Outlook.OlMeetingStatus.olMeeting; agendaMeeting.Location = "Conference Room"; agendaMeeting.Subject = "Discussing the Agenda"; agendaMeeting.Body = "Let's discuss the agenda."; agendaMeeting.Start = new DateTime(2005, 5, 5, 5, 0, 0); agendaMeeting.Duration = 60; Outlook.Recipient recipient = agendaMeeting.Recipients.Add("Nate Sun"); recipient.Type = (int)Outlook.OlMeetingRecipientType.olRequired; ((Outlook._AppointmentItem)agendaMeeting).Send(); } }
Note