Here is a simple example what I do with NKTWAB:
Function GetMailAddressesFromContacts: TTNTStrings;
var wab:INKTWAB;
rootFolder:IFolder;
//RecursFolder
procedure RecursFolder(folder:IFolder);
var nextFolder:IFolder;
folders:IFolders;
contacts:IContacts;
cont:IContact;
i,count:integer;
addr:WideString;
begin
//add Addresses
folder.Get_Contacts(contacts);
contacts.Get_Count(count);
for I := 1 to count do
begin
contacts.Get_Item(i,cont);
addr:='';
cont.Get_DefaultEmailAddress(addr);
if IsCorrectEMailEx(addr) then result.Add(addr);
cont.Get_Email1Address(addr);
if IsCorrectEMailEx(addr) then result.Add(addr);
cont.Get_Email2Address(addr);
if IsCorrectEMailEx(addr) then result.Add(addr);
cont.Get_Email3Address(addr);
if IsCorrectEMailEx(addr) then result.Add(addr);
end;
//recurse subfolders
folder.Get_Folders(folders);
folders.Get_Count(count);
for I := 1 to count do
begin
folders.Get_Item(i,nextFolder);
RecursFolder(nextFolder);
end;
end;
//RecursFolder end
begin
result:=TTNTStringList.Create;
wab:=CoNKTWAB.Create;
wab.Get_RootFolder(rootFolder);
RecursFolder(rootfolder);
end;
Greetings
Harry
> -----Original Message-----
> From: Nektra...@googlegroups.com [mailto:Nektra-
> NKT...@googlegroups.com] On Behalf Of alexander goldberg
> Sent: Tuesday, November 13, 2007 4:06 PM
> To: Nektra-NKTWAB
> Subject: [Nektra-NKTWAB] NKTWAB Delphi examples