procedure TForm1.Button1Click(Sender: TObject); var I,C: integer; MyWideString: array [1..200] of Widechar; MyString: String; OutString : String; RegKey: TRegistry; begin RegKey := TRegistry.Create; try with RegKey do begin RootKey := HKEY_CURRENT_USER; OpenKey('\SOFTWARE\Microsoft\WAB\WAB4\Wab File Name', False); OutString := ReadString(''); end; finally RegKey.Free; end; if Length(OutString) <= 0 then begin ShowMessage('Windows Address book not in' + #13 + 'standard and expected location'); exit; end; begin ListBox1.Clear; // exit; MyFile := TFileStream.Create(OutString,fmOpenRead); Caption := IntToStr(MyFile.Size); C := MyFile.Size div 3; MyFile.Seek(0,soFromBeginning); I := C;//0; while I < (MyFile.Size) do begin Application.ProcessMessages; I := I + 200; MyFile.Read(MyWideString,200); OutString := ''; MyString := MyWideString; for C := 1 to 100 do Begin begin if MyString[C] in ['a'..'z','A'..'Z',' ','@','-','.','_','0'..'9', '&', '!',#7] then OutString := OutString + MyString[C] else OutString:=OutString + '¦';//'[' + IntToStr(e)+ ']'; end; end; if Length(OutString) > 0 then ListBox1.Items.Add(OutString); end; MyFile.Free; end;