Hi, wie komme ich denn an alle Unterordner im Eingang mittel D7 ent.
Mein Code Zeigt mir immer nurd den Eingang an....
Delphi-Quellcode:
procedure TForm1.Button1Click(Sender: TObject);
var
i: integer;
oApp: IApplication;
oAccount: Account;
oArchive: Archive;
oMailItem: MailItem;
oAttachment: Attachment;
oMessageItems: MessageItems;
UserName, Folder: string;
Ordner:OleVariant;
begin
try
oApp := CreateOLEObject('DVOBJAPILIB.DvISEAPI') as IApplication;
oAccount := oApp.Logon(Unassigned, Unassigned, Unassigned, Unassigned,
Unassigned, 'AUTH');
oArchive := oAccount.GetSpecialArchive(DvArchivePersonalIn);
UserName := (oArchive.MailItems.Account.User.Name);
Folder := oArchive.DisplayName;
oMessageItems := oArchive.MailItems;
Memo1.Lines.Clear;
for i:=0 to oMessageItems.Count-1 do begin
oMailItem:=oMessageItems.Item(i) as MailItem;
Memo1.Lines.Add(Folder+'/'+oMailItem.Subject)
end;
finally
oAccount.Logoff;
end;
end;