Microsoft.Office.Interop.Outlook.Application outlook = new Application();
Microsoft.Office.Interop.Outlook.NameSpace oNS = outlook.GetNamespace("MAPI");
oNS.Logon("Profile Name", "Your Password", true, false);
Microsoft.Office.Interop.Outlook.MAPIFolder objMAPIFolder = oNS.GetDefaultFolder(OlDefaultFolders.olFolderCalendar);
Items items = objMAPIFolder.Items;
foreach (object item in items)
{
if (item is Microsoft.Office.Interop.Outlook.AppointmentItem)
{
Microsoft.Office.Interop.Outlook.AppointmentItem mitem = item as Microsoft.Office.Interop.Outlook.AppointmentItem;
string subject = mitem.Subject;
Console.WriteLine(subject);
}
}
oNS.Logoff();
outlook.Quit();
Console.ReadLine();
}
Have a great Day!