Back to Blog
Int numItems = contactsfolder.TotalCount contactItems = servicex.FindItems(WellKnownFolderName.Contacts, view) ![]() Servicex.Credentials = new WebCredentials(userName, password) ĬontactsFolder contactsfolder = ContactsFolder.Bind(servicex, WellKnownFolderName.Contacts) So this is how you can get contacts in Asp.Net public void GetContact()ĮxchangeService servicex = new ExchangeService() For now i have tried it in Asp.Net mvc and it works fine. So i solved it with Microsoft exchange service. Well there is a solution with Microsoft Interop but that creates issue with systems where Microsoft office is not installed. ContactItem contact = (.ContactItem)OutlookItems ĭt.Rows.Add(new object ) OutlookObj = new .Application() įolder_Contacts = (MAPIFolder)(OlDefaultFolders.olFolderContacts) įor (int i = 0 i < OutlookItems.Count i++) Private void button1_Click(object sender, EventArgs e) The used API works fine with outlook 20, but for outlook 2010, it's suggested to use the other API. I have the above-mentioned API for that and got the email address of Outlook that is configured on your system! The code is pasted below. ![]() I have tried the below-mentioned code to fetch the data from Outlook to C# desktop application in gridview.
0 Comments
Read More
Leave a Reply. |