C# Programming
08-01-2009, 12:30 PM
i want to read all the appointments of a outlook 2007 and bind it to DataGridView.
in my application i've add refernce of following library-
Microsoft.Office.Interop.Outlook, Version=12.0.0.0
I'm reading appointments as-
Microsoft.Office.Interop.Outlook.Application app = new Microsoft.Office.Interop.Outlook.ApplicationClass();
Microsoft.Office.Interop.Outlook.NameSpace NS = app.GetNamespace("MAPI");
Microsoft.Office.Interop.Outlook.MAPIFolder objFolder = NS.GetDefaultFolder(Microsoft.Office.Interop.Outlook.OlDefaultFolders.olFolderCalendar);
foreach (Microsoft.Office.Interop.Outlook._AppointmentItem Item in objFolder.Items)
{
string Id = Item.Subject; //etc.............
}
but I'm unable to get Item.GlobalAppointmentID.I've search and find there is GlobalAppointmentID propery but I'm unable to get it. plz help me.
in my application i've add refernce of following library-
Microsoft.Office.Interop.Outlook, Version=12.0.0.0
I'm reading appointments as-
Microsoft.Office.Interop.Outlook.Application app = new Microsoft.Office.Interop.Outlook.ApplicationClass();
Microsoft.Office.Interop.Outlook.NameSpace NS = app.GetNamespace("MAPI");
Microsoft.Office.Interop.Outlook.MAPIFolder objFolder = NS.GetDefaultFolder(Microsoft.Office.Interop.Outlook.OlDefaultFolders.olFolderCalendar);
foreach (Microsoft.Office.Interop.Outlook._AppointmentItem Item in objFolder.Items)
{
string Id = Item.Subject; //etc.............
}
but I'm unable to get Item.GlobalAppointmentID.I've search and find there is GlobalAppointmentID propery but I'm unable to get it. plz help me.