Einzelnen Beitrag anzeigen

Benutzerbild von dataspider
dataspider

Registriert seit: 9. Nov 2003
Ort: 04539 Groitzsch
1.350 Beiträge
 
Delphi 11 Alexandria
 
#1

Outlook und spezieller Kontaktordner

  Alt 13. Jul 2006, 16:13
Hallo,

ich möchte Adressen einer externen PST - Datei importieren.
Dafür habe ich diese in Outlook geöffnet und sie ist jetzt unter einem Ordner
(QKL_Kontakte\Kontakte\Export) erreichbar.
Wie komme ich nun an diese Kontakte ran. Ich erhalte momentan nur meine.

Delphi-Quellcode:
var
  aNameSpace : NameSpace;
  aContacts : MAPIFolder;
  aContactItem : ContactItem;
  iCnt : Integer;
begin
  OutApp.Connect;
  aNameSpace := OutApp.GetNamespace('MAPI');
  aContacts := aNameSpace.GetDefaultFolder(olFolderContacts);
  // OutApp.ActiveExplorer.CurrentFolder := 'QKL_Kontakte';
  // wie Ordner wechseln ???
  for iCnt := 1 to aContacts.Items.Count do
  begin
    aContactItem := aContacts.Items.Item(iCnt) as ContactItem;
    ListBox1.Items.Add(Format('%s : %s', [aContactItem.FirstName,
                       aContactItem.Email1Address]));
  end;
  OutApp.Disconnect;
end;
Danke, Frank
Frank Reim
  Mit Zitat antworten Zitat