S
satishsuman
Hi,
I need to fetch my outlook contacts in a csv file using c#.
I am able to do it by writing all the fields one by one in my data.csv.
e.g.
for (int i = 1; i < = contactFld.Items.Count ; i++)
{
Outlook.ContactItem contact =
(Outlook.ContactItem)contactFld.Items;
if (contact.Email1Address != null || contact.Email2Address
!= null || contact.Email3Address != null)
{
try
{
sw.Write(contact.FirstName);
sw.Write("',");
sw.Write(contact.LastName);
sw.Write("',");
sw.WriteLine(contact.Email1Address);
}
catch (Exception e1)
{
MessageBox.Show("Error");
}
}
}
Now, instead of creating this .csv file, I want to fetch the .csv file
diretly.
Is there any method to fetch it directly from MAPIFolder element?
Or any other way..
I need to fetch my outlook contacts in a csv file using c#.
I am able to do it by writing all the fields one by one in my data.csv.
e.g.
for (int i = 1; i < = contactFld.Items.Count ; i++)
{
Outlook.ContactItem contact =
(Outlook.ContactItem)contactFld.Items;
if (contact.Email1Address != null || contact.Email2Address
!= null || contact.Email3Address != null)
{
try
{
sw.Write(contact.FirstName);
sw.Write("',");
sw.Write(contact.LastName);
sw.Write("',");
sw.WriteLine(contact.Email1Address);
}
catch (Exception e1)
{
MessageBox.Show("Error");
}
}
}
Now, instead of creating this .csv file, I want to fetch the .csv file
diretly.
Is there any method to fetch it directly from MAPIFolder element?
Or any other way..