P
pratikasthana17
Hi,
I want those contact details who are in appointment,I am able to get
the Name of attendee with following code.But i am not able to get his
corresponding Mobile/Telephone Number
Code:
--------------------
int i = 0;
int j=0;
Outlook.Recipients rec;
Outlook.Application oApp = new Outlook.Application();
Outlook.NameSpace oNS = oApp.GetNamespace("MAPI");
oNS.Logon(Type.Missing, Type.Missing, false, true);
Outlook.MAPIFolder Ocalender = oNS.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderCalendar );
Outlook.Items oItems = Ocalender.Items;
int iNumContacts = oItems.Count;
DataSet ds_temp = new DataSet();
DataTable dtable_temp = new DataTable("Temp_Table");
dtable_temp.Columns.Add("Sr. No.");
dtable_temp.Columns.Add("Name");
dtable_temp.Columns.Add("Phone");
dtable_temp.Columns.Add("Check", typeof(bool));
DataRow dr_temp;
if (iNumContacts != 0)
{
for (i = 1; i <= iNumContacts; i++)
{
dr_temp = dtable_temp.NewRow();
Outlook.AppointmentItem c = (Outlook.AppointmentItem)(oItems);
rec = c.Recipients ;
for (j = 1; j <= rec.Count; j++)
{
string re = rec[j].AddressEntry.Name ;
}
}
}
--------------------
Can u help me
Thanks in Advance
Pratik Asthana
I want those contact details who are in appointment,I am able to get
the Name of attendee with following code.But i am not able to get his
corresponding Mobile/Telephone Number
Code:
--------------------
int i = 0;
int j=0;
Outlook.Recipients rec;
Outlook.Application oApp = new Outlook.Application();
Outlook.NameSpace oNS = oApp.GetNamespace("MAPI");
oNS.Logon(Type.Missing, Type.Missing, false, true);
Outlook.MAPIFolder Ocalender = oNS.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderCalendar );
Outlook.Items oItems = Ocalender.Items;
int iNumContacts = oItems.Count;
DataSet ds_temp = new DataSet();
DataTable dtable_temp = new DataTable("Temp_Table");
dtable_temp.Columns.Add("Sr. No.");
dtable_temp.Columns.Add("Name");
dtable_temp.Columns.Add("Phone");
dtable_temp.Columns.Add("Check", typeof(bool));
DataRow dr_temp;
if (iNumContacts != 0)
{
for (i = 1; i <= iNumContacts; i++)
{
dr_temp = dtable_temp.NewRow();
Outlook.AppointmentItem c = (Outlook.AppointmentItem)(oItems);
rec = c.Recipients ;
for (j = 1; j <= rec.Count; j++)
{
string re = rec[j].AddressEntry.Name ;
}
}
}
--------------------
Can u help me
Thanks in Advance
Pratik Asthana