Articles   Members Online: 3
-Article/Tip Search
-News Group Search over 21 Million news group articles.
-Delphi/Pascal
-CBuilder/C++
-C#Builder/C#
-JBuilder/Java
-Kylix
Member Area
-Home
-Account Center
-Top 10 NEW!!
-Submit Article/Tip
-Forums Upgraded!!
-My Articles
-Edit Information
-Login/Logout
-Become a Member
-Why sign up!
-Newsletter
-Chat Online!
-Indexes NEW!!
Employment
-Build your resume
-Find a job
-Post a job
-Resume Search
Contacts
-Contacts
-Feedbacks
-Link to us
-Privacy/Disclaimer
Embarcadero
Visit Embarcadero
Embarcadero Community
JEDI
Links
How to retrieve addresses from MS Outlook Turn on/off line numbers in source code. Switch to Orginial background IDE or DSP color Comment or reply to this aritlce/tip for discussion. Bookmark this article to my favorite article(s). Print this article
Retrieve addresses from MS Outlook 22-Jul-04
Category
MS-Office
Language
Delphi All Versions
Views
359
User Rating
No Votes
# Votes
0
Replies
0
Publisher:
Darley, F. Joe
Reference URL:
			1   
2   unit Unit1;
3   
4   interface
5   
6   uses
7     Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
8     Dialogs,ComObj, StdCtrls;
9   
10  type
11    TForm1 = class(TForm)
12      Button1: TButton;
13      Memo1: TMemo;
14      procedure Button1Click(Sender: TObject);
15    private
16      { private declarations }
17    public
18      { public declarations }
19    end;
20  
21  var
22    Form1: TForm1;
23  
24  implementation
25  
26  {$R *.dfm}
27  
28  procedure TForm1.Button1Click(Sender: TObject);
29  var
30    Outlook, NameSpace : Variant;
31    vFolder: Variant;
32    i: Integer;
33  begin
34      Outlook := CreateOleObject('Outlook.Application');
35      NameSpace := Outlook.GetNameSpace('MAPI');
36  
37      //10 is for accessing the Contacts list
38      vFolder:= NameSpace.GetDefaultFolder(10);
39  
40      Memo1.Lines.Add('First Name         LastName          Email Address');
41  
42  for i:= 1 to vFOlder.items.count-1 do begin
43     Memo1.Lines.Add(vFOlder.items[i].FullName+', '+vFOlder.items[i].LastName+
44     ', '+vFOlder.items[i].Email1Address);
45  end;
46  
47  end;
48  end.
49  


			
Vote: How useful do you find this Article/Tip?
Bad Excellent
1 2 3 4 5 6 7 8 9 10

 

Advertisement
Share this page
Advertisement
Download from Google

Copyright © Mendozi Enterprises LLC