Windows with Delphi Windows API (94) Windows Filesystem (41) Windows Forms (69) Windows Graphics (38)
Exchange Links About this site Links to us 
|
Retrieving Addresses from MS Outlook
This article has not been rated yet. After reading, feel free to leave comments and rate it.
The following code retrieves email addresses from MS Outlook:  | |  | | uses
ComObj;
var
Outlook, NameSpace, AddressList, AddressEntries: Variant;
i: Integer;
begin
Outlook := CreateOleObject('Outlook.Application');
NameSpace := Outlook.GetNameSpace('MAPI');
AddressList := NameSpace.AddressLists('Personal Address Book');
AddressEntries := AddressList.AddressEntries;
for i := 0 to AddressEntries.Count - 1 do
Memo1.Lines.Add(AddressEntries.Item(i).name + ' (' + AddressEntries.Item(i).Address + ')');
end;
| |  | |  | You don't like the formatting? Check out SourceCoder then!
Comments:
|
Nelson Staples from United States
|
|
|
|
eeee
|
|