Click here to Skip to main content
15,845,785 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi Gurus, I want to create appointments in and put them in to calendars of specified users. Currently I can create an appointment and save it into the outlook calendar of my local machine where the app is running. I want the appointment to be saved into the attendee's calendar. Please help. Thanks.

What I have tried:

Outlook.Application outlookApp = new Outlook.Application();
            Outlook.AppointmentItem appt = (Outlook.AppointmentItem)outlookApp.CreateItem(Outlook.OlItemType.olAppointmentItem);

            appt.Subject = "Testing";
            appt.Body = "Test Appointment body";
            appt.Location = "D";
            appt.Sensitivity = Outlook.OlSensitivity.olPrivate;
            appt.Start = DateTime.Parse("04/22/2016 08:00 AM");
            appt.End = DateTime.Parse("04/25/2016 08:00 AM");
            appt.ReminderSet = true;
             appt.RequiredAttendees = ";";
            appt.Importance = Outlook.OlImportance.olImportanceHigh;
            appt.ReminderMinutesBeforeStart = 10;
Updated 21-Apr-16 3:13am
F-ES Sitecore 21-Apr-16 7:47am    
Outlook is a desktop client for your particular account settings on your machine, there is rarely any point in using automation to solve tasks unless the mail storage is local only. If you're using Exchange then you need to create the appointment in Exchange, not in Outlook, so look into Exchange Web Services. If you're not using a common Exchange then you'll have to just email the appointment and they can accept it and store it or ignore it\delete it.

1 solution

You cannot create the appointment directly in their calendar from your code. You will NOT have access to their calendars unless they share it out to you *very unlikely) and you will NOT have impersonation permissions to put the appointments in their calendar either.

You have no choice but to create the appointment in an email and send it to them. That way they can just click on the appointment Accept button and put it in their calendar themselves.
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900