Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Outlook notify

Status
Not open for further replies.

pconrad

IS-IT--Management
Jul 12, 2002
28
US
I am writing an app that needs to check for unread items. I have accomplished this for the inbox. How do I check folders that the user has created?

Thanks,

PC
 
The following should work for DOS/Windows:

function ScanNew(APath: string; ADate: TDateTime): TStringList;
// APath is the initial path to start the search
// ADate is the date and time of the last check

var
sRecd: TSearchRec;
bInit: Boolean;
begin
bInit := false;
if FindFirst(APath, faAnyFile, sRecd) = 0 then begin
if FileDateToDateTime(sRecd.Time) >= ADate then begin
bInit := true;
Result := TStringList.Create;
Result.Add(sRecd.Name);
end;
while FindNext(sRecd) = 0 do
if FileDateToDateTime(sRecd.Time) >= ADate then begin
if not bInit then begin
bInit := true;
Result := TStringList.Create;
end;
Result.Add(sRecd.Name);
end;
FindClose(sRecd);
end;
if not bInit then
Result := nil;
end;

And, after typing this all, I realize that you are talking about checking inside Outlook! So much for my brilliant thoughts... [sad]
I first thought about cancelling the post, but maybe somebody else can use this code... Cheers,
Nico
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top