Compartilhar via


Como: Criar uma Solicitar de reunião

Se aplica a

As informações contidas neste tópico se aplicam apenas às especificado Ferramentas do Visual Studio para o Office projetos e as versões do Microsoft Office.

Tipo de Projeto

  • Projetos de nível de aplicativo

Versão do Microsoft Office

  • Outlook 2003

  • Outlook 2007

For more information, see Recursos disponíveis pelo aplicativo e o tipo de projeto.

Este exemplo cria uma Solicitar de reunião no Microsoft Office Outlook e envia a Solicitar para um participante necessário.

Exemplo

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();
    }
}

Consulte também

Conceitos

Trabalhando com itens de calendário

Introdução Programação Application-Nível Adicionar-ins