Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click ' Create an Outlook application. Dim outApplication As Outlook.Application = New Outlook.Application() ' Get the namespace and the logon. Dim outNamSpace As Outlook.NameSpace = outApplication.GetNamespace("MAPI") ' Create a new contact item. Dim NewContact As Outlook.ContactItem = outApplication.CreateItem(Outlook.OlItemType.olContactItem) ' Set some common properties. NewContact.FirstName = "Author" NewContact.FullName = "Author Code" NewContact.Title = "Client" NewContact.Birthday = Convert.ToDateTime("5/4/1969") NewContact.CompanyName = "AuthorCode" NewContact.Department = "Development" NewContact.Body = "Sample" NewContact.FileAs = "Authorcode" NewContact.Email1Address = "firstname.lastname@example.org" NewContact.Email2Address = "email@example.com" NewContact.MailingAddress = "NewDelhi India" NewContact.Subject = "Contact crated from vb.net" NewContact.JobTitle = "Engineer" NewContact.Save() outApplication = Nothing outNamSpace = Nothing NewContact = Nothing End Sub
Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.
”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.