const
folder_kontaktow = $0000000A;
var
Outlook, NameSpace, Kontakty, Kontakt : OleVariant;
i : Integer;
//----------------------------
Outlook := CreateOleObject('Outlook.Application');
NameSpace := Outlook.GetNameSpace('MAPI');
//----------------------------
Kontakty := NameSpace.GetDefaultFolder(folder_kontaktow);
//-------------------------------------------------
for i := 1 to Kontakty.Items.Count do
begin
Kontakt := Kontakty.Items.Item(i);
ListBox1.Items.Add(Kontakt.FullName); // Imie i Nazwisko
ListBox2.Items.AddKontakt.Email1Address ); // Adres e-mail
ListBox3.Items.Add(Kontakt.BusinessTelephoneNumber); // Numer telefonu
end;
Outlook := UnAssigned; // Zwolnienie zmiennej Outlook
//----------------------------------------------------------
Users browsing this forum: No registered users and 11 guests