Každý kontakt reprezentuje v Outlooku objekt ContactItem. Aby ste našli všetky kontakty je nutné prejsť kolekciu Items objektu MAPIFolder
Dim olApp As Outlook.Application, nsp As Outlook.NameSpace
Dim
olFld As Outlook.MAPIFolder, i As Long
Set olApp = New Outlook.Application
Set
nsp = olApp.Namespace("MAPI")
Set olFld = nsp.GetDefaultFolder(olFolderContacts)
i
= olFld.Items.Count
For x = 1 to i
Debug.Print
olFld.Items(x).FullName 'celé
meno
Debug.Print olFld.Items(x).CompanyName 'meno
spoločnosti
Debug.Print olFld.Items(x).EmailAddress 'mailová
adresa
Next x
olApp.Quit