You'd be better off comparing the entry ids rather than names.
The fact that (IExplorer.CurrentFolder FOutlookTodayFolder) is perfectly
normal. Each time you access Explorer.CurrentFolder, OOM returns a brand new
COM object.
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
"Slava Barouline" slavadotbarouline@recruitmentsystemsdotcomdotau wrote in
message ...
I have found an ugly hack
I check if I am in 'Outlook Today' folder:
IExplorer.CurrentFolder.Name FOutlookTodayFolder.Name
Strangely
IExplorer.CurrentFolder FOutlookTodayFolder
doesn't work for some reason
I get FOutlookTodayFolder like this:
NmSpace := OutlookApp.GetNamespace('MAPI');
Inbox := NmSpace.GetDefaultFolder(olFolderInbox);
FOutlookTodayFolder := Inbox.Parent as MAPIFolder;