Add new contact item to Outlook : Outlook Contact « Outlook « VBA / Excel / Access / Word






Add new contact item to Outlook

 
Sub AddAContact()
   Dim myOutlook As Outlook.Application
   Dim myItems As ContactItem

   Set myOutlook = CreateObject("Outlook.Application")
   Set myItems = myOutlook.CreateItem(olContactItem)

   With myItems
      .FirstName = "John"
      .LastName = "Smith"
      .Email1Address = "johnsmith@yoursite.com"
      .Save
    End With
End Sub

 








Related examples in the same category

1.Print all names from your contact list in Outlook
2.Delete a contact from Outlook
3.Create Outlook.Application
4.add a contact through VBA
5.Add recipient