1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43:
| uses ... , Outlook8,...
procedure ViewSendMail(Liste: TStringGrid); var SendMailFolder: Variant; email: Variant; n, i, j: longint; s, subj: string; Datum: TDateTime; begin initOutlook; if not OutlookExist then begin MessageDlg(EMailInfo, mtInformation, [mbOk], 0); EXIT; end; j := 0; SendMailFolder := oleNameSpace.GetDefaultFolder(olFolderSentMail); n := SendMailFolder.Items.Count; Liste.ColCount := 6; Liste.Cells[0, 0] := 'i'; Liste.Cells[1, 0] := 'gelesen'; Liste.Cells[2, 0] := 'Datum'; Liste.Cells[3, 0] := 'von'; Liste.Cells[4, 0] := 'an'; Liste.Cells[5, 0] := 'Betreff'; for i := 1 to n do begin email := oleNameSpace.GetDefaultFolder(olFolderSentMail).Items(i); Liste.RowCount := i + 1; Liste.Cells[0, i] := IntToStr(i); if EMail.Unread then Liste.Cells[1, i] := 'NEIN' else Liste.Cells[1, i] := 'JA'; Liste.Cells[2, i] := DateTimeToStr(EMail.SentOn); Liste.Cells[3, i] := EMail.SenderName; Liste.Cells[4, i] := EMail. to ; Liste.Cells[5, i] := EMail.Subject; end; end; |