Freigeben über


Gewusst wie: Erstellen einer Besprechungsanfrage

Aktualisiert: November 2007

Betrifft

Die Informationen in diesem Thema gelten nur für die angegebenen Visual Studio Tools for Office-Projekte und Versionen von Microsoft Office.

Projekttyp

  • Projekte auf Anwendungsebene

Microsoft Office-Version

  • Outlook 2003

  • Outlook 2007

Weitere Informationen hierzu finden Sie unter Verfügbare Features nach Anwendung und Projekttyp.

In diesem Beispiel wird in Microsoft Office Outlook eine Besprechungsanfrage erstellt und an einen erforderlichen Teilnehmer gesendet.

Beispiel

Private Sub ThisAddIn_Startup(ByVal sender As Object, _
 ByVal e As System.EventArgs) Handles Me.Startup
    Dim agendaMeeting As Outlook.AppointmentItem = CType( _
        Me.Application.CreateItem(Outlook.OlItemType.olAppointmentItem),  _
        Outlook.AppointmentItem)

    If agendaMeeting IsNot Nothing Then
        agendaMeeting.MeetingStatus = _
            Outlook.OlMeetingStatus.olMeeting
        agendaMeeting.Location = "Conference Room"
        agendaMeeting.Subject = "Discussing the Agenda"
        agendaMeeting.Body = "Let's get together to discuss the " _
            & "agenda."
        agendaMeeting.Start = New System.DateTime( _
            2005, 5, 5, 5, 0, 0)
        agendaMeeting.Duration = 60
        Dim recipient As Outlook.Recipient = _
            agendaMeeting.Recipients.Add("Nate Sun")
        recipient.Type = Outlook.OlMeetingRecipientType.olRequired

        agendaMeeting.Send()

    End If
End Sub
private void ThisAddIn_Startup(object sender, System.EventArgs e)
{
    Outlook.AppointmentItem agendaMeeting = (Outlook.AppointmentItem)
        this.Application.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();
    }
}

Siehe auch

Konzepte

Arbeiten mit Kalenderelementen

Erste Schritte beim Programmieren von Add-Ins auf Anwendungsebene