How do I create and send appointments to Microsoft Outlook calender?

前端 未结 3 713
小鲜肉
小鲜肉 2021-01-02 17:10

I am trying to create an appointment in the Microsoft Outlook (2003) calender of another person using the below code.While running this program, The Appointment is getting s

相关标签:
3条回答
  • 2021-01-02 17:44

    After you have the appointment:

    Outlook.MailItem mailItem = appt.ForwardAsVcal();
    mailItem.To = "recipient's email address";
    mailItem.Send();
    
    0 讨论(0)
  • 2021-01-02 17:48

    Here is how I fixed this issue :

    I put (like Sonny Boy's post) :

    Outlook.MailItem mailItem = appt.ForwardAsVcal();
    mailItem.To = "firstname.lastname@email.com";
    mailItem.Send();
    

    But I also had to create a web.config file, and to set up the authorization access to avoid any COMException :

    <system.web>
      <authorization>
        <deny users="?"/>
      </authorization>
    </system.web>
    
    0 讨论(0)
  • 2021-01-02 18:01

    Try adding:

    appt.MeetingStatus = Microsoft.Office.Interop.Outlook.OlMeetingStatus.olMeeting;
    

    Default status is an appointment which I'm not sure is being sent.

    0 讨论(0)
提交回复
热议问题