var
Form1: TForm1;
LV : TListView;
procedure TForm1.Button1Click(Sender: TObject);
const
Kontaktordner = $0000000A;
var
outlook,
Name, Kontakte, Kontakt: OleVariant;
i : Integer;
l : TListItem;
begin
outlook := CreateOleObject('
Outlook.Application');
Name := outlook.GetNameSpace('
MAPI');
Kontakte :=
Name.GetDefaultFolder(Kontaktordner);
for i := 1
to Kontakte.Items.Count
do
begin
Kontakt := Kontakte.Items.Item(i);
l := LV.Items.Add;
l.Caption := Kontakt.FullName;
l.Subitems.Add(Kontakt.Email1Address);
l.Subitems.Add(Kontakt.Email1AddressType);
end;
Outlook := UnAssigned;
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
LV := TListView.Create(self);
LV.Parent := Form1;
with LV
do
begin
Align := alBottom;
Height := 200;
ViewStyle := VSReport;
Columns.Add();
Columns.Items[0].Caption := '
Name';
Columns[0].Width := 220;
Columns.Add();
Columns.Items[1].Caption := '
eMail-Adresse';
Columns[1].Width := 220;
Columns.Add();
Columns.Items[2].Caption := '
eMail-Typ';
Columns[2].Width := 80;
GridLines := True;
end;
end;
Liste der Eigenschaften die aus Outlook ausgelesen werden können
Birthday
Business2TelephoneNumber
BusinessAddress
BusinessAddressCity
BusinessAddressCountry
BusinessAddressPostalCode
BusinessAddressPostOfficeBox
BusinessAddressState
BusinessAddressStreet
BusinessFaxNumber
BusinessHomePage
BusinessTelephoneNumber
CompanyAndFullName
CompanyMainTelephoneNumber
CompanyName
ComputerNetworkName
Department
Email1Address
Email1AddressType
Email1DisplayName
Email2Address
Email2AddressType
Email2DisplayName
Email3Address
Email3AddressType
Email3DisplayName
FirstName
FTPSite
FullName
FullNameAndCompany
GovernmentIDNumber
Hobby
Home2TelephoneNumber
HomeAddress
HomeAddressCity
HomeAddressCountry
HomeAddressPostalCode
HomeAddressPostOfficeBox
HomeAddressState
HomeAddressStree
HomeFaxNumber
HomeTelephoneNumber
Initials
ISDNNumber
JobTitle
Language
LastName
LastNameAndFirstName
MailingAddress
MailingAddressCity
MailingAddressCountry
MailingAddressPostalCode
MailingAddressPostOfficeBox
MailingAddressState
MailingAddressStreet
MiddleName
NickName
OfficeLocation
OrganizationalIDNumber
PersonalHomePage
PrimaryTelephoneNumber
Profession
Suffix
Title
WebPage