procedure TForm1.FormCreate(Sender: TObject);
var Ns:_NameSpace;
Fd:MAPIFolder;
Im:Items;
ContItem:ContactItem;
i:integer;
begin
self.OutlookApplication1.Connect;
Ns:=OutlookApplication1.GetNamespace('MAPI');
Fd:=Ns.GetDefaultFolder(olFolderContacts);
Im:=Fd.Items;
for i:=1 to Im.Count do
begin
ContItem:=Im.Item(i) as _ContactItem;
ListBox1.Items.Add(ContItem.Email1Address);
end;
procedure TForm1.FormCreate(Sender: TObject);
var Ns:_NameSpace;
Fd:MAPIFolder;
Im:Items;
ContItem:ContactItem;
i:integer;
begin
self.OutlookApplication1.Connect;
Ns:=OutlookApplication1.GetNamespace('MAPI');
Fd:=Ns.GetDefaultFolder(olFolderContacts);
Im:=Fd.Items;
for i:=1 to Im.Count do
begin
ContItem:=Im.Item(i) as _ContactItem;
ListBox1.Items.Add(ContItem.Email1Address);
end;
If you need to turn the tables and access Outlook data in order to write that
data to a remote data store, what options do you have? Although this article
focuses on bringing enterprise data into Outlook workflow applications, I’ll
briefly discuss the current options you face when you want to bring MAPI data
into a database. An Microsoft Exchange indexed sequential access method (ISAM)
driver is available which can link or import an Microsoft Exchange folder
(Mailbox or Public folder) or an Microsoft Exchange Address Book (including the
GAL) with Microsoft Access.
Download the Outlook Microsoft ExchangeWizard at
http://www.microsoft.com/AccessDev/AccWhite/ExchWiz.htm. This URL also contains
a comprehensive article on “Accessing Exchange and Outlook Data Using Visual
Basic.”