Read/Write Office Outlook contacts from .NET
1. Install Office XP/2003/2007
2. Add COM reference to Microsoft Outlook 10/11/12 Object Library
Imports msoutlook = Microsoft.Office.Interop.Outlook
‘read
Dim outlookApp As New msoutlook.Application()
Dim outlookNS As msoutlook.NameSpace = outlookApp.GetNamespace(“MAPI”)
Dim theContacts As msoutlook.MAPIFolder = outlookNS.GetDefaultFolder(msoutlook.OlDefaultFolders.olFolderContacts)
For Each contact As Microsoft.Office.Interop.Outlook.ContactItem In theContacts.Items
Console.WriteLine(contact.FileAs)
Debug.WriteLine(contact.FileAs)
Next
‘create new
Dim cnt As msoutlook.ContactItem = CType(outlookApp.CreateItem(msoutlook.OlItemType.olContactItem), msoutlook.ContactItem)
cnt.FileAs = “New Contact”
cnt.MobileTelephoneNumber = “1234567”
cnt.Save()
Hi
We can help your website to get on first page of Google and increase the number of leads and sales you are getting from your website. Please email us back for full proposal.
Best Regards
Andy