How to create appointment with all in Outlook c#

Aleš N 1 Reputation point

I have troubles with sending appointments to shared calendar programatically. I know that the standard way is as below:

MAPIFolder sharedFolder = mapiNamespace.GetSharedDefaultFolder(recipient, OlDefaultFolders.olFolderCalendar);  
Outlook.AppointmentItem newAppointment = sharedFolder.Items.Add(Outlook.OlItemType.olAppointmentItem) as Outlook.AppointmentItem;  
//Outlook.AppointmentItem newAppointment = sharedFolder.Items.Add("IPM.Appointment"); ///Second option  

But probably it is equal to clicking into shared calendar and require write rights.

I need to do it as below in GUI, this allow to send appointment even if I do not have write rights:

NOTE: (In English) New appointment --> New appointment with all


NOTE2: If I send it by standard way (see code below), it will not send it to shared folder (also it is not in sent folder).

Outlook.AppointmentItem newAppointment = (Outlook.AppointmentItem)application.CreateItem(Outlook.OlItemType.olAppointmentItem);  
newAppointment.Start = startT;// DateTime.Now.AddHours(2);  
newAppointment.End = stopT;  
newAppointment.Subject = name;  
newAppointment.Location = loc;  
newAppointment.Body = body;  
newAppointment.AllDayEvent = false;  
for (int i = 0; i < rec.Count; i++) newAppointment.Recipients.Add(rec[i]);  
Outlook.Recipients sentTo = newAppointment.Recipients;  

Thank you in advance for your answers.

An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,410 questions
Outlook Management
Outlook Management
Outlook: A family of Microsoft email and calendar products.Management: The act or process of organizing, handling, directing or controlling something.
4,957 questions
0 comments No comments
{count} votes