Link to home
Start Free TrialLog in
Avatar of ProgsX
ProgsX

asked on

outlookExpress and outlook address book

I want the address of contacts of OutlookExpress and Outlook. My code result does not have anything, not function. can you help me.

Var i, j, : Integer;
      obj: OleVariant;
begin
      ListView1.Items.Clear;
      try
        obj := CreateOleObject('outlookExpress.application');
        obj := obj.GetNameSpace('MAPI');
        for i := 1 to obj.AddressLists.Count do
        begin
          for j := 1 to obj.AddressLists(i).AddressEntries.Count do
            ListView1.Items.Add.Caption := string(obj.AddressLists(i).AddressEntries(j).Address);
        end;
      except
      end;
end;
ASKER CERTIFIED SOLUTION
Avatar of bernani
bernani
Flag of Belgium image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ProgsX,

any feedback ?