add a contact through VBA
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 = "j@yourserver.com"
.Save
End With
End Sub
Related examples in the same category