outlook contacts in csv using c#

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..
 
P

Pochi

Hi Satish,

I am facing the same problem... Have you got any solution for this?

Please reply...

Thanks in Advance
 
S

Sripathi Rao

Hi Satish,

I am facing the same problem... Have you got any solution for this?

Please reply...

Thanks in Advance
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top