sangeetha K

sangeetha K

  • NA
  • 15
  • 1.3k

Calender booking using .net mvc for other users

Nov 30 2021 12:34 PM

how can i block a calender using .net mvc in outlook ?

public static void CreateCalenderControl()
{
    Microsoft.Office.Interop.Outlook.Application app = null;
    Microsoft.Office.Interop.Outlook.AppointmentItem appt = null;
    app = new Microsoft.Office.Interop.Outlook.Application();
    appt = (Microsoft.Office.Interop.Outlook.AppointmentItem)app.CreateItem(Microsoft.Office.Interop.Outlook.OlItemType.olAppointmentItem);
    appt.Subject = "Meeting";
    appt.Body = "Test";
    appt.Location = "A roon";
    appt.Start = Convert.ToDateTime(DateTime.Now);
    appt.Recipients.Add("[email protected]");
  
    appt.End = Convert.ToDateTime(DateTime.Now.AddDays(1));
    appt.ReminderSet = true;
    appt.ReminderMinutesBeforeStart = 15;
    appt.Importance = Microsoft.Office.Interop.Outlook.OlImportance.olImportanceHigh;
    appt.BusyStatus = Microsoft.Office.Interop.Outlook.OlBusyStatus.olBusy;
    appt.Save();
}

the above  coce i got it from some refenece posts but it isnt working for other mails only for the mails that are there in my system is working 

kindly do the needful and thanks in advance!


Answers (3)