Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Sonstige Fragen zu Delphi (https://www.delphipraxis.net/19-sonstige-fragen-zu-delphi/)
-   -   Delphi Outlook und spezieller Kontaktordner (https://www.delphipraxis.net/73205-outlook-und-spezieller-kontaktordner.html)

dataspider 13. Jul 2006 16:13


Outlook und spezieller Kontaktordner
 
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


Alle Zeitangaben in WEZ +1. Es ist jetzt 09:30 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz